## https://yukicoder.me/problems/no/423 def main(): N = input() if N == "ham": print("ham") else: print(N + "ham") if __name__ == "__main__": main()