s=input() print(s+"ham"if s!="ham"else s)