#include <bits/stdc++.h>// 万能头

using namespace std;

int main() {

    string s;

    while(cin>>s){

    int mi=1e6;

    unordered_map<char,int>m;// 用来存储每个字符出现的次数 也可以用数组来代替

    int n=s.length();

    for(auto x:s){// 开始遍历

        m[x]++;

    }

    for(auto x:s){// 找寻出现的最小次数

        mi=min(mi,m[x]);

    }

    for(auto &x:s){

        if(m[x]==mi)continue;

        cout<<x; // 最后输出

     }

    }

}

// #牛客春招刷题训练营# + 链接

// 64 位输出请用 printf("%lld")