hamu = gets.chomp
print hamu == "ham" ? hamu+"\n" : hamu+"ham\n"