#include <iostream> 
#include <sstream> 
#include <iomanip> 
#include <vector> 
#include <string> 
#include <map> 
#include <set> 
#include <algorithm> 
#include <numeric> 
#include <iterator> 
#include <functional> 
#include <complex> 
#include <queue> 
#include <stack> 
#include <cmath> 
#include <cassert> 
#include <cstring> 
using namespace std; 
typedef long long LL; 
typedef complex<double> CMP; 

class LargestSubsequence { public: 
  string getLargest(string s) 
  { 
    string result; 
    for(string::iterator it=s.begin(); it!=s.end(); ) { 
      it = max_element(it, s.end()); 
      if( it != s.end() ) 
        result += *it++; 
    } 
    return result; 
  } 
}; 
