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