import sys
input=lambda: sys.stdin.readline().rstrip()
s=input()
if s=="ham":
  print(s)
else:
  print(s+"ham")