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