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