#include<iostream>
#include<string>
#include<vector>
#include <climits>
//提供了与整数类型相关的宏常量,用于表示各种整数类型的最小值和最大值,部分版本不需要该头文件。
//#include <algorithm>
//包含了许多用于操作容器(如数组、向量、列表等)的通用算法。
using namespace std;
int main() {
string s;
cin >> s;
//26个字母在字母表中的排行数字减一与count角标相对应
vector<int> count(26, 0);
//统计每个字母出现的次数,其出现次数就是对应角标的count存储的数字
for (char ch : s) {
count[ch - 'a'] ++;
}
//当发现一个大于0并小于目前最小计数的数值时,更新最小计数的数值
int mincount = INT_MAX;
for (int num : count) {
if (num > 0 && num < mincount)
mincount = num;
}
//如果计数等于最小计数,则不会将该字母加入res字符串中
string res;
for (char c : s) {
if (count[c - 'a'] != mincount) {
res += c;
}
}
cout << res << endl;
return 0;
}