def main(): from sys import stdin input=stdin.readline s = input()[:-1] if s == 'ham': print(s) else: print(s + 'ham') main()