As mentioned - it really depends. But Hamburg and Dresden are of course very nice cities for a 3-5 day stay - a good mixture of culture (Dresden) and vibrant citylife (Hamburg). Berlin is only a short trainride (I assume that AA codeshares with Deutsche Bahn) from both cities - should be ~90 minutes.
More help?
More input!