#include #include #include #include #include #include #include #include #include #include #include #include #define LL long long #define INF 0X3F3F3F3F #define MOD 1000000007 #define N 20010 #define FF(i,a,b) for(int i=a;i<=b;++i) #define RR(i,b,a) for(int i=b;i>=a;--i) #define SC(x) scanf("%d",&x) #define SCC(x,y) scanf("%d%d",&x,&y) #define SCCC(x,y,z) scanf("%d%d%d",&x,&y,&z) #define SS(x) scanf("%s",x) #define PR(x) printf("%d\n",x) #define CL(a,b) memset(a,b,sizeof(a)) #define PB push_back #define SI sizeof() #define FIN freopen("in.txt","r",stdin) #define FOUT freopen("out.txt","w",stdout) using namespace std; const double PI=acos(-1.0); const double EPS=1e-8; int main(){ int i,j,_,n,m,ans,a[N]; string tmp; mapmp; cin>>_; while(_--){ cin>>tmp; sort(tmp.begin(),tmp.end()); cout<