s = input() if s[:4] != "hamu": print(s) else: ss = s + "ham" print(ss)