/*
#include <bits/stdc++.h>

#define PB          push_back
#define PF          push_front
#define MP          make_pair
#define FI          first
#define SE          second
#define SIZE( A )   int( ( A ).size( ) )
#define ALL( A )    ( A ).begin( ), ( A ).end( )
#define ALLR( A )   ( A ).rbegin( ), ( A ).rend( )

using namespace std;

typedef long long           ll;
typedef unsigned long long  ull;
typedef long double         lf;
typedef pair< int, int >    pii;
typedef pair< ll, ll >      pll;
typedef vector< bool >      vb;
typedef vector< lf >        vd;
typedef vector< ll >        vll;
typedef vector< int >       vi;
typedef vector< pii >       vpii;

const int MAXN = int( 2e5 )+10;
const int MOD  = int( 1e9 )+7;
const int oo   = INT_MAX;

int n;
string str;
int nxt[ MAXN ][ 255 ];

int dp[ MAXN ];

int go( int i ) {
  if( i == -1 ) {
    return 0;
  }
  int& r = dp[ i ];
  if( r != -1 ) {
    return r;
  }
  r = oo;
  for( int j = 'a'; j <= 'z'; ++j ) {
    r = min( r, go( nxt[i][j] )+1 );
  }
  return r;
} 

void rebuild( int i ) {
  if( i == -1 ) {
    return ;
  } 
  for( int j = 'a'; j <= 'z'; ++j ) {
    if( nxt[i][j] == -1 || dp[ i ] == dp[ nxt[i][j] ]+1 ) {
      cout << char(j);
      rebuild( nxt[i][j] );
      return ;
    }
  }
  assert( false );
}

int main( ) {

  #ifdef LOCAL
    freopen( "input", "r", stdin );
    //freopen( "output", "w", stdout );
  #else
    //freopen( ".in", "r", stdin );
    //freopen( ".out", "w", stdout );
    ios_base::sync_with_stdio( 0 );
    cin.tie( 0 );
  #endif

  while( cin >> str ) {
    n = SIZE( str );
    memset( nxt, -1, sizeof( nxt ) );
    for( int i = n-1; i >= 0; --i ) {
      for( int j = 0; j < 255; ++j ) {
        nxt[ i ][ j ] = nxt[ i+1 ][ j ];
      }
      nxt[ i ][ str[i] ] = i+1;
    }
    memset( dp, -1, sizeof( dp ) );
    int len = go( 0 );
    rebuild( 0 ); cout << '\n';
  }

  return 0;
}
*/
#include <bits/stdc++.h>

#define PB          push_back
#define PF          push_front
#define MP          make_pair
#define FI          first
#define SE          second
#define SIZE( A )   int( ( A ).size( ) )
#define ALL( A )    ( A ).begin( ), ( A ).end( )
#define ALLR( A )   ( A ).rbegin( ), ( A ).rend( )

using namespace std;

typedef long long           ll;
typedef unsigned long long  ull;
typedef long double         lf;
typedef pair< int, int >    pii;
typedef pair< ll, ll >      pll;
typedef vector< bool >      vb;
typedef vector< lf >        vd;
typedef vector< ll >        vll;
typedef vector< int >       vi;
typedef vector< pii >       vpii;

const int MAXN = int( 2e5 )+10;
const int MOD  = int( 360 );
const int oo   = INT_MAX; 
const int A    = 26;

string s;
int nxt[ A ][ MAXN ];
int dp[ MAXN ];
string ans;

void precalc() {
  int sz = SIZE(s);
  for( int i = 0; i < A; ++i ) {
    nxt[ i ][ sz ] = -1;
  }
  for( int i = sz-1; i >= 0; --i ) {
    for( int j = 0; j < A; ++j ) {
      nxt[ j ][ i ] = nxt[ j ][ i+1 ];
    }
    nxt[ s[i]-'a' ][ i ] = i+1;
  }
}

void solve() {
  int sz = SIZE(s);
  dp[ sz ] = 1;
  for( int i = sz-1; i >= 0; --i ) {
    dp[ i ] = oo;
    for( int j = 0; j < A; ++j ) {
      if( nxt[ j ][ i ] == -1 ) dp[ i ] = 1;
      else dp[ i ] = min( dp[i], dp[ nxt[ j ][ i ] ]+1 );
    }
  }
}

void get_ans( int cur ) {
  for( int i = 0; i < A; ++i ) {
    if( nxt[ i ][ cur ] == -1 ) {
      ans.PB( 'a'+i );
      return;
    }
    else if( dp[ cur ] == dp[ nxt[i][cur] ]+1 ) {
      ans.PB( 'a'+i );
      get_ans( nxt[i][cur] );
      return ;
    }
  }
}

int main( ) {

  #ifdef LOCAL
    freopen( "input", "r", stdin );
    //freopen( "output", "w", stdout );
  #else
    //freopen( "input", "r", stdin );
    //freopen( "output", "w", stdout );
    ios_base::sync_with_stdio( 0 );
    cin.tie( 0 );
  #endif

  while( cin >> s ) {
    precalc();
    solve();
    ans = "";
    get_ans( 0 );
    cout << ans << endl;
  }
  return 0;
}

Measured memory_bytes: 21652