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