#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <bitset>
#include <numeric>
#include <utility>
#include <iomanip>
#include <algorithm>
#include <functional>
#include <unordered_map>
using namespace std;

#define REP(i, s) for (int i = 0; i < s; ++i)
#define ALL(v) (v.begin(), v.end())
#define COUT(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl
#define EACH(i, s) for (__typeof__((s).begin()) i = (s).begin(); i != (s).end(); ++i)

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
template<class T1, class T2> ostream& operator << (ostream &s, pair<T1,T2> P)
{ return s << '<' << P.first << ", " << P.second << '>'; }
template<class T> ostream& operator << (ostream &s, vector<T> P)
{ for (int i = 0; i < P.size(); ++i) { if (i > 0) { s << " "; } s << P[i]; } return s; }
template<class T> ostream& operator << (ostream &s, vector<vector<T> > P)
{ for (int i = 0; i < P.size(); ++i) { s << endl << P[i]; } return s << endl; }
template<class T> ostream& operator << (ostream &s, set<T> P)
{ EACH(it, P) { s << "<" << *it << "> "; } return s << endl; }
template<class T1, class T2> ostream& operator << (ostream &s, map<T1,T2> P)
{ EACH(it, P) { s << "<" << it->first << "->" << it->second << "> "; } return s << endl; }

const int MAX = 410000;
string S;

int nch[MAX][30];
int dp[MAX];
int reid[MAX];
char rechar[MAX];
int lastInd[30];

int main() {
    while (cin >> S) {
        memset(nch, -1, sizeof(nch));
        memset(reid, -1, sizeof(reid));
        memset(lastInd, -1, sizeof(lastInd));
        
        for (int i = (int)S.size()-1; i >= 0; --i) {
            for (int j = 0; j < 30; ++j) nch[i][j] = lastInd[j];
            lastInd[S[i]-'a'] = i;
        }
        
        
        /* reigai */
        int first = -1;
        for (int i = 0; i < 26; ++i) {
            if (lastInd[i] == -1) {
                first = i;
                break;
            }
        }
        if (first != -1) {
            cout << (char)('a' + first) << endl;
            continue;
        }
        
        
        /* DP */
        dp[(int)S.size()-1] = 2;
        for (int i = (int)S.size()-2; i >= 0; --i) {
            dp[i] = MAX;
            for (int j = 0; j < 26; ++j) {
                if (nch[i][j] == -1) {
                    dp[i] = 2;
                    reid[i] = -1;
                    rechar[i] = 'a' + j;
                    break;
                }
                if (chmin(dp[i], dp[nch[i][j]] + 1)) {
                    reid[i] = nch[i][j];
                    rechar[i] = 'a' + j;
                }
            }
            //cout << i << ": " << dp[i] << ", " << reid[i] << "; " << S[reid[i] != -1 ? reid[i] : 0] << endl;
        }

        
        /* reconstruct */
        int Min = MAX;
        int ind = -1;
        for (int j = 0; j < 26; ++j) {
            int tmp = lastInd[j];
            if (chmin(Min, dp[tmp] + 1)) ind = tmp;
        }
        string res = "";
        res += S[ind];
        while (ind != -1) {
            //COUT(ind); COUT(S[ind]);
            res += rechar[ind];
            ind = reid[ind];
        }
        
        cout << res << endl;
    }
}











Measured memory_bytes: 51972