# -*- coding: utf-8 -*- import sys,copy,math,heapq,itertools as it,fractions,re,bisect,collections as coll s = raw_input() print s + "ham" if s != "ham" else "ham"