#include "bits/stdc++.h" #define REP(i,n,N) for(ll i=(n); i<(N); i++) #define RREP(i,n,N) for(ll i=(N-1); i>=n; i--) #define CK(n,a,b) ((a)<=(n)&&(n)<(b)) #define ALL(v) (v).begin(),(v).end() #define p(s) cout<<(s)<>N){ string mx=N; REP(i,0,N.size()-1){ REP(j,i+1,N.size()){ string M=N; swap(M[i], M[j]); mx = max(mx, M); } } p(mx); } return 0; }