import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import static java.lang.System.in; public class Main { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(in)); String N = reader.readLine(); String binaryString = hamToBinary(N); int doubledNum = Integer.parseInt(binaryString, 2) * 2; System.out.println(binaryToHam(Integer.toBinaryString(doubledNum))); } private static String hamToBinary(String N) { N += "h"; StringBuilder binaryString = new StringBuilder(); for (int i = 1; i < N.length(); i++) { if (N.charAt(i) == 'h') { if (N.charAt(i - 1) == 'u') { binaryString.append(1); } else if (N.charAt(i - 1) == 'm') { binaryString.append(0); } } } return binaryString.toString(); } private static String binaryToHam(String binaryString) { StringBuilder builder = new StringBuilder(); for (int i = 0; i < binaryString.length(); i++) { if (binaryString.charAt(i) == '0') { builder.append("ham"); } else { builder.append("hamu"); } } return builder.toString(); } }