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