s = raw_input() print "ham" if s == "ham" else s + "ham"