S = input() print(S if S == 'ham' else S +'ham')