import java.util.*; class A { static Scanner s = new Scanner(System.in); public static void main(String[] args) { String in = s.nextLine().replaceAll("hamu", "1").replaceAll("ham", "0"); System.out.println(Integer.toBinaryString(Integer.parseInt(in,2)*2).replaceAll("1","hamu").replaceAll("0","ham")); } }