#include using namespace std; int main(){ string s; cin >> s; string t = ""; for(char c : s){ if(t == "" || !(t[t.length()-1]=='m'&&c=='m')) t += c; } cout << t << endl; return 0; }