targ = input() temp = "" num = "" for t in targ: temp += t if temp == "hamh": temp = "h" num += '0' elif temp == "hamu": temp = "" num += '1' temp = bin(int(num,2) * 2)[2:] ans = "" for t in temp: if t == '0': ans += "ham" else: ans += "hamu" print(ans)