print((lambda s: len(s)==3 and s or s+"ham")(input()))