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