#yuki_423 s=raw_input() if s=='ham': print s else: print s+'ham'