#include #include #include using namespace std; string s; string ts; string t; string r; bool first=true; int nagasa; int main() { cin >> s; s += 'a'; nagasa = s.size(); for (int i = 0; i < nagasa; i++) { if (s[i] == 'm') { if (s[i + 1] == 'u') { ts += 'o'; } else { ts += 'z'; } } } nagasa = ts.size(); for (int i = 0; i <=nagasa; i++) { if (ts[i] == 'z') { r += "mah"; } if (ts[i] == 'o') { while (ts[i] == 'o') { if (first == false){ r += "umah"; } else { r += "mah"; first = false; } i++; if (ts[i] == 'z') { r += "umah"; break; } if (i >= nagasa) { r += "umah"; break; } } } first = true; } nagasa = r.size(); for (int i = nagasa-1; i >=0; i--) { t += r[i]; } cout << t<<"\n" << endl; return 0; }