import java.util.Scanner; public class MAin { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String n = scan.next(); scan.close(); StringBuilder sb = new StringBuilder(); int l = 0; for(int i = 0; i < n.length(); i++) { char c = n.charAt(i); if(c == 'h') { if(l == 2) { sb.append(0); }else if(l == 3) { sb.append(1); } l = 0; }else { l ++; } if(i == n.length() - 1) { if(l == 2) { sb.append(0); }else if(l == 3) { sb.append(1); } } } int val = Integer.parseInt(sb.toString(), 2); val = val * 2; String ans = Integer.toBinaryString(val); for(int i = 0; i < ans.length(); i++) { char c = ans.charAt(i); if(c == '1') { System.out.print("hamu"); }else { System.out.print("ham"); } } System.out.println(); } }