#include <iostream>
#include <string>
using namespace std;
static string str_get;
static string str_change;
void deletChar(string str,char _char,int num)
{
int flag = 0;
for(int i = 0;i<num;i++)
{
flag = str.find(_char);
//这里别忘了赋值,否则删除字符无效
str_change = str.erase(flag,1);
}
}
int main()
{
while(cin>>str_get)
{
str_change = str_get;
int word_array[200] = {0};
int num_least = 20;
//直接使用字符作为下标
for(int i = 0;i<str_get.size();i++)
word_array[str_get[i]]++;
for(int i = 0;i<str_get.size();i++)
if(word_array[str_get[i]]<num_least)
num_least = word_array[str_get[i]];
for(int i = 0;i<str_get.size();i++)
if(word_array[str_get[i]]==num_least)
deletChar(str_change,str_get[i],word_array[str_get[i]]);
cout<<str_change<<endl;
}
}