#include using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x>s; string ma=s; FOR(i,s.size()) FOR(j,s.size()) FOR(x,s.size()) FOR(y,s.size()) { if(i==x || i==y || j==x || j==y) continue; swap(s[i],s[j]); swap(s[x],s[y]); ma=max(ma,s); swap(s[i],s[j]); swap(s[x],s[y]); } cout<