st=input() if st!="ham": print(st+"ham") else: print(st)