Hamilton's hit helps Reds beat Brewers 6-5