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