import java.util.Scanner; public class Hamgo { public static void main(String[] args) { Scanner s = new Scanner(System.in); String n = s.nextLine(); s.close(); n = n.replaceAll("hamu", "1"); n = n.replaceAll("ham", "0"); int k = 2 * Integer.parseUnsignedInt(n, 2); n = Integer.toBinaryString(k); StringBuilder ans = new StringBuilder(); for(int i = 0;i < n.length();i++){ if(n.charAt(i) == '1'){ ans.append("hamu"); }else{ ans.append("ham"); } } System.out.println(ans); } }