s = str(input()) if s != 'ham': print(s+'ham') else: print(s)