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