#include <iostream>
#include <string>
#include <unordered_map>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
string str = "";
cin >> str;
unordered_map<char, int> m;
for(char c : str){
m[c]++;
}
vector<int> tmp;
for(auto iter = m.begin(); iter != m.end(); iter++){
tmp.push_back(iter->second);
}
sort(tmp.begin(), tmp.end());
string res = "";
for(char c : str){
if(m[c] != tmp[0]){
res += c;
}
}
cout << res << endl;
return 0;
}