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