print((function (s) return #s==3 and s or s.."ham" end)(io.stdin:read("*l")))