#include #include #include using namespace std; using ll = long long; template using vec = vector; template using vvec = vector>; int main(){ string S; cin >> S; int N = S.size(); vector cnt(10); set s; for(int i=0;i=0;i--) for(int j=0;j=0;i--){ if(ans[i]!=ans[i-1]){ swap(ans[i-1],ans[N-1]); break; } } cout << ans << endl; }