/** *Author: xiaoran *Solution: * */ #include #include #include #include #include #include #include #include #include #include #include #include #include #define LL long long using namespace std; const int MAXN=1000005; int main() { //freopen("E:/input.txt","r",stdin); //freopen("E:/output.txt","w",stdout); int n; map num; while(cin>>n){ num.clear(); string s,ss; for(int i=0;i>s; sort(s.begin(),s.end()); cout<