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