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