s,h = input(),"ham" print(s if s==h else s+h)