#define _USE_MATH_DEFINES #include #include #include #include #include #include //#include #include #include #include #include #include #include ///////// #define REP(i, x, n) for(int i = x; i < n; i++) #define rep(i,n) REP(i,0,n) #define P(p) cout<<(p)< ///////// typedef long long LL; typedef long double LD; ///////// using namespace::std; ///////// int main(void){ std::cin.tie(0); std::ios::sync_with_stdio(false); std::cout << std::fixed;// cout << setprecision(16);// string str; cin>>str; int max=-1,maxpos=0; max = str[0]; for(int i=1;i= max){ max = str[i]; maxpos = i; } } if( maxpos > 0){ swap(str[0],str[maxpos]); } max = str[1]; maxpos = 1; for(int i=2;i= max){ max = str[i]; maxpos = i; } } if( maxpos > 1){ swap(str[1],str[maxpos]); } P(str); return 0; }