n = input() a = int(n.replace('hamu', '1').replace('ham', '0'), 2) * 2 print(format(a, 'b').replace('1', 'hamu').replace('0', 'ham'))