#include <algorithm>
#include <iostream>
#include <string>
#include <unordered_map>
using namespace std;
int main() {
string str;
cin >> str;
unordered_map<char, int> myMap;
int smallest = str.size() + 1;
for (auto &c : str) {
myMap[c]++;
}
for (auto iter = myMap.begin(); iter != myMap.end(); ++iter) {
smallest = min(smallest, iter->second);
}
for (auto &c : str) {
if (myMap[c] == smallest) {
continue;
}
cout << c;
}
return 0;
}
// 64 位输出请用 printf("%lld")