#include <bits/stdc++.h>
#define ll long long
using namespace std;
ll gcd(ll a, ll b) { return b == 0 ? a : gcd(b, a % b); }
ll lcm(ll a, ll b){return (1ll*a*b)/gcd(a, b);}
bool isGood(string &s)
{
    for(int i=0;i<s.size()-1;++i)
    {
        if(abs(s[i]-s[i+1])==1) return false;
    }
    return true;
}
void solve(string &s)
{
    sort(s.begin(),s.end());
    map<char,int> freq; for(auto l : s) freq[l]++;
    s.resize(unique(s.begin(),s.end())-s.begin());int c = 0;
    while(!isGood(s))
    {
        random_shuffle(s.begin(),s.end());
        c++;
        if(c==1005) {cout<<"No answer"; return;}
    }
    for(auto l : s)
    {
        while(freq[l]--) cout<<l;
    }
    cout<<'\n';
}
int main()
{
    ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
    int t;
    cin>>t;
    while(t--)
    {
        string s; cin>>s;
        solve(s);
    }
}


#include<bits/stdc++.h>
#define ll long long
#define R register int
#define inf 0x3f3f3f3f
#define mod 1000000007;
using namespace std;
inline ll read(){
   ll s=0,w=1;
   char ch=getchar();
   while(ch<'0'||ch>'9'){if(ch=='-')w=-1;ch=getchar();}
   while(ch>='0'&&ch<='9') s=s*10+ch-'0',ch=getchar();
   return s*w;
}
void put1(){ puts("Yes") ;}
void put2(){ puts("No") ;}

const int manx=200;

int main()
{
    ll p=read();
    while(p--)
    {
        string s;
        cin>>s;
        int n=s.size();
        for(int i=0;i<n;i++)
            for(int j=i+1;j<n;j++)
                if(s[j]<s[i])
                    swap(s[i],s[j]);
        queue<char>s1,s2;
        char c=s[0];
        s1.push(s[0]);
        for(int i=1;i<s.size();i++)
        {
            if(s[i]-c==1) s2.push(s[i]);
            else s1.push(s[i]),c=s[i];
        }
        s="";
         int flag=0;
        if(abs(c-s2.front()!=1)){
            while(s1.size()) s+=s1.front(),s1.pop();
            if(abs(s[s.size()-1]-s2.front())==1) flag=1;
            while(s2.size()) s+=s2.front(),s2.pop();
        }
        else{
            while(s2.size()) s+=s2.front(),s2.pop();

            if(abs(s[s.size()-1]-s1.front())==1) flag=1;
            while(s1.size()) s+=s1.front(),s1.pop();
        }

        /*
        while(s2.size()) s+=s2.front(),s2.pop();
        int flag=0;
        if(abs(s[s.size()-1]-s1.front())==1) flag=1;
        while(s1.size()) s+=s1.front(),s1.pop();

            */

        if(flag) puts("No answer");
        else
        cout<<s<<endl;

    }
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define R register int
#define inf 0x3f3f3f3f
#define mod 1000000007;
using namespace std;
inline ll read(){
   ll s=0,w=1;
   char ch=getchar();
   while(ch<'0'||ch>'9'){if(ch=='-')w=-1;ch=getchar();}
   while(ch>='0'&&ch<='9') s=s*10+ch-'0',ch=getchar();
   return s*w;
}
void put1(){ puts("Yes") ;}
void put2(){ puts("No") ;}

const int manx=200;

int main()
{
    ll p=read();
    while(p--)
    {
        string s;
        cin>>s;
        int n=s.size();
        for(int i=0;i<n;i++)
            for(int j=i+1;j<n;j++)
                if(s[j]<s[i])
                    swap(s[i],s[j]);
        queue<char>s1,s2;
        char c=s[0];
        s1.push(s[0]);
        for(int i=1;i<s.size();i++)
        {
            if(s[i]-c==1) s2.push(s[i]);
            else s1.push(s[i]),c=s[i];
        }
        s="";
         int flag=0;
        if(abs(c-s2.front()!=1)){
            while(s1.size()) s+=s1.front(),s1.pop();
            while(s2.size()) s+=s2.front(),s2.pop();
        }
        else{
            while(s2.size()) s+=s2.front(),s2.pop();

            if(abs(s[s.size()-1]-s1.front())==1) flag=1;
            while(s1.size()) s+=s1.front(),s1.pop();
        }

        /*
        while(s2.size()) s+=s2.front(),s2.pop();
        int flag=0;
        if(abs(s[s.size()-1]-s1.front())==1) flag=1;
        while(s1.size()) s+=s1.front(),s1.pop();

            */

        if(flag) puts("No answer");
        else
        cout<<s<<endl;

    }
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define R register int
#define inf 0x3f3f3f3f
#define mod 1000000007;
using namespace std;
inline ll read(){
   ll s=0,w=1;
   char ch=getchar();
   while(ch<'0'||ch>'9'){if(ch=='-')w=-1;ch=getchar();}
   while(ch>='0'&&ch<='9') s=s*10+ch-'0',ch=getchar();
   return s*w;
}
void put1(){ puts("Yes") ;}
void put2(){ puts("No") ;}

const int manx=200;

int main()
{
    ll p=read();
    while(p--)
    {
        string s;
        cin>>s;
        int n=s.size();
        for(int i=0;i<n;i++)
            for(int j=i+1;j<n;j++)
                if(s[j]<s[i])
                    swap(s[i],s[j]);
        queue<char>s1,s2;
        char c=s[0];
        s1.push(s[0]);
        for(int i=1;i<s.size();i++)
        {
            if(s[i]-c==1) s2.push(s[i]);
            else s1.push(s[i]),c=s[i];
        }
        s="";
        while(s2.size()) s+=s2.front(),s2.pop();
        int flag=0;
        if(abs(s[s.size()-1]-s1.front())==1) flag=1;
        while(s1.size()) s+=s1.front(),s1.pop();
        if(flag) puts("No answer");
        else
        cout<<s<<endl;

    }
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define R register int
#define inf 0x3f3f3f3f
#define mod 1000000007;
using namespace std;
inline ll read(){
   ll s=0,w=1;
   char ch=getchar();
   while(ch<'0'||ch>'9'){if(ch=='-')w=-1;ch=getchar();}
   while(ch>='0'&&ch<='9') s=s*10+ch-'0',ch=getchar();
   return s*w;
}
void put1(){ puts("Yes") ;}
void put2(){ puts("No") ;}

const int manx=200;

int main()
{
    ll p=read();
    while(p--)
    {
        string s;
        cin>>s;
        int n=s.size();
        for(int i=0;i<n;i++)
            for(int j=i+1;j<n;j++)
                if(s[j]<s[i])
                    swap(s[i],s[j]);
        queue<char>s1,s2;
        char c=s[0];
        s1.push(s[0]);
        for(int i=1;i<s.size();i++)
        {
            if(s[i]-c==1) s2.push(s[i]);
            else s1.push(s[i]),c=s[i];
        }
        s="";
         int flag=0;
        if(abs(c-s1.front()==1)){
            while(s1.size()) s+=s1.front(),s1.pop();
            while(s2.size()) s+=s2.front(),s2.pop();
        }
        else{
            while(s2.size()) s+=s2.front(),s2.pop();

            if(abs(s[s.size()-1]-s1.front())==1) flag=1;
            while(s1.size()) s+=s1.front(),s1.pop();
        }

        /*
        while(s2.size()) s+=s2.front(),s2.pop();
        int flag=0;
        if(abs(s[s.size()-1]-s1.front())==1) flag=1;
        while(s1.size()) s+=s1.front(),s1.pop();

            */

        if(flag) puts("No answer");
        else
        cout<<s<<endl;

    }
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define R register int
#define inf 0x3f3f3f3f
#define mod 1000000007;
using namespace std;
inline ll read(){
   ll s=0,w=1;
   char ch=getchar();
   while(ch<'0'||ch>'9'){if(ch=='-')w=-1;ch=getchar();}
   while(ch>='0'&&ch<='9') s=s*10+ch-'0',ch=getchar();
   return s*w;
}
void put1(){ puts("Yes") ;}
void put2(){ puts("No") ;}

const int manx=200;

int main()
{
    ll p=read();
    while(p--)
    {
        string s;
        cin>>s;
        int n=s.size();
        for(int i=0;i<n;i++)
            for(int j=i+1;j<n;j++)
                if(s[j]<s[i])
                    swap(s[i],s[j]);
        queue<char>s1,s2;
        char c=s[0];
        s1.push(s[0]);
        for(int i=1;i<s.size();i++)
        {
            if(s[i]-c==1) s2.push(s[i]);
            else s1.push(s[i]),c=s[i];
        }
        s="";
         int flag=0;
        if(abs(c-s2.front()==1)){
            while(s1.size()) s+=s1.front(),s1.pop();
            while(s2.size()) s+=s2.front(),s2.pop();
        }
        else{
            while(s2.size()) s+=s2.front(),s2.pop();

            if(abs(s[s.size()-1]-s1.front())==1) flag=1;
            while(s1.size()) s+=s1.front(),s1.pop();
        }

        /*
        while(s2.size()) s+=s2.front(),s2.pop();
        int flag=0;
        if(abs(s[s.size()-1]-s1.front())==1) flag=1;
        while(s1.size()) s+=s1.front(),s1.pop();

            */

        if(flag) puts("No answer");
        else
        cout<<s<<endl;

    }
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define R register int
#define inf 0x3f3f3f3f
#define mod 1000000007;
using namespace std;
inline ll read(){
   ll s=0,w=1;
   char ch=getchar();
   while(ch<'0'||ch>'9'){if(ch=='-')w=-1;ch=getchar();}
   while(ch>='0'&&ch<='9') s=s*10+ch-'0',ch=getchar();
   return s*w;
}
void put1(){ puts("Yes") ;}
void put2(){ puts("No") ;}

const int manx=200;

int main()
{
    ll p=read();
    while(p--)
    {
        string s;
        cin>>s;
        int n=s.size();
        for(int i=0;i<n;i++)
            for(int j=i+1;j<n;j++)
                if(s[j]<s[i])
                    swap(s[i],s[j]);
        queue<char>s1,s2;
        char c=s[0];
        s1.push(s[0]);
        for(int i=1;i<s.size();i++)
        {
            if(s[i]-c==1) s2.push(s[i]);
            else s1.push(s[i]),c=s[i];
        }
        s="";
         int flag=0;
        if(abs(c-s2.front())!=1){
            while(s1.size()) s+=s1.front(),s1.pop();
            if(abs(s[s.size()-1]-s2.front())==1) flag=1;
            while(s2.size()) s+=s2.front(),s2.pop();
        }
        else{
            while(s2.size()) s+=s2.front(),s2.pop();

            if(abs(s[s.size()-1]-s1.front())==1) flag=1;
            while(s1.size()) s+=s1.front(),s1.pop();
        }

        /*
        while(s2.size()) s+=s2.front(),s2.pop();
        int flag=0;
        if(abs(s[s.size()-1]-s1.front())==1) flag=1;
        while(s1.size()) s+=s1.front(),s1.pop();

            */

        if(flag) puts("No answer");
        else
        cout<<s<<endl;

    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
const int maxn=1e2+5;
char s[maxn];
char a[maxn],b[maxn],cnt1,cnt2;
int main(){
	int t;
	scanf("%d",&t);
	while(t--){
		scanf("%s",s);
		int slen=strlen(s);
		cnt1=0,cnt2=0;
		for(int i=0;i<slen;i++){
			int dif=s[i]-'a';
			if(dif&1){
				a[cnt1++]=s[i];
			}else{
				b[cnt2++]=s[i];
			}
		}
		sort(a,a+cnt1);
		sort(b,b+cnt2);
		if(cnt1==0){
			for(int i=0;i<cnt2;i++){
				printf("%c",b[i]);
			}
			printf("\n");
			continue;
		}
		if(cnt2==0){
			for(int i=0;i<cnt1;i++){
				printf("%c",a[i]);
			}
			printf("\n");
			continue;
		}
		if(abs(a[cnt1-1]-b[0])!=1){
			for(int i=0;i<cnt1;i++){
				printf("%c",a[i]);
			}
			for(int i=0;i<cnt2;i++){
				printf("%c",b[i]);
			}
			printf("\n");
			continue;
		}
		if(abs(a[0]-b[cnt2-1])!=1){
			for(int i=0;i<cnt2;i++){
				printf("%c",b[i]);
			}
			for(int i=0;i<cnt1;i++){
				printf("%c",a[i]);
			}
			printf("\n");
			continue;
		}
		printf("No answer\n");
	}
}


#include<bits/stdc++.h>
using namespace std;
const int maxn=1e2+5;
char a[maxn];
vector<int>g[maxn];
int vis[maxn];
int pos,mxdep;
int path[maxn];
int slen,ok;
void dfs(int u,int dep){
	if(ok) return ;
	path[dep]=u;
	if(dep==slen){
		for(int i=1;i<=dep;i++){
			printf("%c",a[path[i]]);
		}
		printf("\n");
		ok=1;
		return ;
	}
	int r=g[u].size();
	for(int i=0;i<r;i++){
		int v=g[u][i];
		if(vis[v]) continue;
		vis[v]=1;
		dfs(v,dep+1);
		vis[v]=0;
	}
}
int main(){
	int t;
	scanf("%d",&t);
	while(t--){
		scanf("%s",a);
		slen=strlen(a);
		for(int i=0;i<slen;i++){
			g[i].clear();
		}
		for(int i=0;i<slen;i++){
			for(int j=i+1;j<slen;j++){
				if(abs(a[i]-a[j])!=1){
					g[i].push_back(j);
					g[j].push_back(i);
				}
			}
		}
		mxdep=0;
		ok=0;
		for(int i=0;i<slen;i++){
			vis[i]=1;
			dfs(i,1);
			vis[i]=0;
			if(ok){
				break;
			}
		}
		if(!ok){
			printf("No answer\n");
		}
	}
}


#include<bits/stdc++.h>
using namespace std;
const int maxn=1e2+5;
char a[maxn];
vector<int>g[maxn];
int vis[maxn];
int path[maxn];
int slen,ok;
int vis2[maxn<<1];
void dfs(int u,int dep){
	if(ok) return ;
	path[dep]=u;
	if(dep==slen){
		for(int i=1;i<=dep;i++){
			printf("%c",a[path[i]]);
		}
		printf("\n");
		ok=1;
		return ;
	}
	int r=g[u].size();
	for(int i=0;i<r;i++){
		int v=g[u][i];
		if(vis[v]) continue;
		vis[v]=1;
		dfs(v,dep+1);
		vis[v]=0;
	}
}
int main(){
	int t;
	scanf("%d",&t);
	while(t--){
		scanf("%s",a);
		slen=strlen(a);
		for(int i=0;i<slen;i++){
			g[i].clear();
		}
		for(int i=0;i<slen;i++){
			for(int j=i+1;j<slen;j++){
				if(abs(a[i]-a[j])!=1){
					g[i].push_back(j);
					g[j].push_back(i);
				}
			}
		}
		ok=0;
		memset(vis2,0,sizeof(vis2));
		for(int i=0;i<slen;i++){
			if(vis2[a[i]]) continue;
			vis2[a[i]]=1;
			vis[i]=1;
			dfs(i,1);
			vis[i]=0;
			if(ok){
				break;
			}
		}
		if(!ok){
			printf("No answer\n");
		}
	}
}


#include<bits/stdc++.h>
using namespace std;
const int maxn=1e2+5;
char a[maxn];
vector<int>g[maxn];
int vis[maxn];
int path[maxn];
int slen,ok;
int vis2[maxn<<1];
void dfs(int u,int dep){
	if(ok) return ;
	path[dep]=u;
	if(dep==slen){
		for(int i=1;i<=dep;i++){
			printf("%c",a[path[i]]);
		}
		printf("\n");
		ok=1;
		return ;
	}
	int r=g[u].size();
	for(int i=0;i<r;i++){
		int v=g[u][i];
		if(vis[v]) continue;
		vis[v]=1;
		dfs(v,dep+1);
		vis[v]=0;
	}
}
int main(){
	int t;
	scanf("%d",&t);
	while(t--){
		scanf("%s",a);
		slen=strlen(a);
		for(int i=0;i<slen;i++){
			g[i].clear();
		}
		for(int i=0;i<slen;i++){
			for(int j=i+1;j<slen;j++){
				if(abs(a[i]-a[j])!=1){
					g[i].push_back(j);
					g[j].push_back(i);
				}
			}
		}
		ok=0;
		memset(vis2,0,sizeof(vis2));
		for(int i=0;i<1;i++){
			if(vis2[a[i]]) continue;
			vis2[a[i]]=1;
			vis[i]=1;
			dfs(i,1);
			vis[i]=0;
			if(ok){
				break;
			}
		}
		if(!ok){
			printf("No answer\n");
		}
	}
}


#include<bits/stdc++.h>
using namespace std;
const int maxn=1e2+5;
char a[maxn];
vector<int>g[maxn];
int vis[maxn];
int pos,mxdep;
int path[maxn];
int slen,ok;
void dfs1(int u,int dep){
	if(ok) return ;
	path[dep]=u;
	if(dep==slen){
		for(int i=1;i<=dep;i++){
			printf("%c",a[path[i]]);
		}
		printf("\n");
		ok=1;
		return ;
	}
	int r=g[u].size();
	for(int i=0;i<r;i++){
		int v=g[u][i];
		if(vis[v]) continue;
		vis[v]=1;
		dfs1(v,dep+1);
		vis[v]=0;
	}
}
int main(){
	int t;
	scanf("%d",&t);
	while(t--){
		scanf("%s",a);
		slen=strlen(a);
		for(int i=0;i<slen;i++){
			g[i].clear();
		}
		for(int i=0;i<slen;i++){
			for(int j=i+1;j<slen;j++){
				if(abs(a[i]-a[j])!=1){
					g[i].push_back(j);
					g[j].push_back(i);
				}
			}
		}
		mxdep=0;
		ok=0;
		for(int i=0;i<slen;i++){
			vis[i]=1;
			dfs1(i,1);
			vis[i]=0;
			if(ok){
				break;
			}
		}
		if(!ok){
			printf("No answer\n");
		}
	}
}


#include<bits/stdc++.h>
using namespace std;
const int maxn=1e2+5;
char a[maxn];
vector<int>g[maxn];
int vis[maxn];
int path[maxn];
int slen,ok;
int mxdep[maxn];
void dfs(int u,int dep){
	if(ok) return ;
	if(dep<=mxdep[u]) return ;
	mxdep[u]=dep;
	path[dep]=u;
	if(dep==slen){
		for(int i=1;i<=dep;i++){
			printf("%c",a[path[i]]);
		}
		printf("\n");
		ok=1;
		return ;
	}
	int r=g[u].size();
	for(int i=0;i<r;i++){
		int v=g[u][i];
		if(vis[v]) continue;
		vis[v]=1;
		dfs(v,dep+1);
		vis[v]=0;
	}
}
int main(){
	int t;
	scanf("%d",&t);
	while(t--){
		scanf("%s",a);
		slen=strlen(a);
		for(int i=0;i<slen;i++){
			g[i].clear();
		}
		for(int i=0;i<slen;i++){
			for(int j=i+1;j<slen;j++){
				if(abs(a[i]-a[j])!=1){
					g[i].push_back(j);
					g[j].push_back(i);
				}
			}
		}
		ok=0;
		for(int i=0;i<slen;i++){
			memset(mxdep,-1,sizeof(mxdep));
			vis[i]=1;
			dfs(i,1);
			vis[i]=0;
			if(ok){
				break;
			}
		}
		if(!ok){
			printf("No answer\n");
		}
	}
}


#include<bits/stdc++.h>
using namespace std;
const int maxn=1e2+5;
char a[maxn];
vector<int>g[maxn];
int vis[maxn];
int pos,mxdep;
int ans[maxn];
int path[maxn];
int tt[maxn];
void dfs1(int u,int dep){
	path[dep]=u;
	if(dep>mxdep){
		mxdep=dep;
		pos=u;
		for(int i=1;i<=dep;i++){
			tt[i]=path[i];
		}
	}
	int r=g[u].size();
	for(int i=0;i<r;i++){
		int v=g[u][i];
		if(vis[v]) continue;
		vis[v]=1;
		dfs1(v,dep+1);
		vis[v]=0;
	}
}
int main(){
	int t;
	scanf("%d",&t);
	while(t--){
		scanf("%s",a);
		int slen=strlen(a);
		for(int i=0;i<slen;i++){
			g[i].clear();
		}
		for(int i=0;i<slen;i++){
			for(int j=i+1;j<slen;j++){
				if(abs(a[i]-a[j])!=1){
					g[i].push_back(j);
					g[j].push_back(i);
				}
			}
		}
		mxdep=0;
		int mx=0;
		for(int i=0;i<slen;i++){
			vis[i]=1;
			dfs1(i,1);
			if(mx<mxdep){
				mx=mxdep;
				for(int j=1;j<=mx;j++){
					ans[j]=tt[j];
				}
			}
			vis[i]=0;
		}
		if(mx<slen){
			printf("No answer\n");
		}else{
			for(int i=1;i<=mx;i++){
				printf("%c",a[ans[i]]);
			}
			printf("\n");
		}
	}
}


#include <bits/stdc++.h>
using namespace std;

bool valid(string x)
{
	assert(x.size());
	for (int i = 0; i < x.size() - 1; i++)
		if (abs(x[i] - x[i+1]) == 1)
			return false;
	return true;
}

int main()
{
	int T;
	cin >> T;
	while (T--)
	{
		string x;
		cin >> x;
		bool found = false;
		for (int i = 0; i < 20000; i++)
		{
			random_shuffle(x.begin(), x.end());
			if (valid(x))
			{
				cout << x << '\n';
				found = true;
				break;
			}
		}
		if (!found)
			cout << "No answer\n";
	}
}


#include <bits/stdc++.h>
using namespace std;

bool valid(string x)
{
	assert(x.size());
	for (int i = 0; i < x.size() - 1; i++)
		if (abs(x[i] - x[i+1]) == 1)
			return false;
	return true;
}

int main()
{
	int T;
	cin >> T;
	while (T--)
	{
		string x;
		cin >> x;
		bool found = false;
		for (int i = 0; i < 100000; i++)
		{
			random_shuffle(x.begin(), x.end());
			if (valid(x))
			{
				cout << x << '\n';
				found = true;
				break;
			}
		}
		if (!found)
			cout << "No answer\n";
	}
}


#include <bits/stdc++.h>
using namespace std;

bool valid(string x)
{
	assert(x.size());
	for (int i = 0; i < x.size() - 1; i++)
		if (abs(x[i] - x[i+1]) == 1)
			return false;
	return true;
}

int main()
{
	int T;
	cin >> T;
	while (T--)
	{
		string x;
		cin >> x;
		bool found = false;
		for (int i = 0; i < 25000; i++)
		{
			random_shuffle(x.begin(), x.end());
			if (valid(x))
			{
				cout << x << '\n';
				found = true;
				break;
			}
		}
		if (!found)
			cout << "No answer\n";
	}
}


#include <bits/stdc++.h>
using namespace std;

bool valid(string x)
{
	assert(x.size());
	for (int i = 0; i < x.size() - 1; i++)
		if (abs(x[i] - x[i+1]) == 1)
			return false;
	return true;
}

int main()
{
	srand(time(NULL));
	int T;
	cin >> T;
	while (T--)
	{
		string x;
		cin >> x;
		bool found = false;
		for (int i = 0; i < 13000; i++)
		{
			random_shuffle(x.begin(), x.end());
			if (valid(x))
			{
				cout << x << '\n';
				found = true;
				break;
			}
		}
		if (!found)
			cout << "No answer\n";
	}
}


#include <bits/stdc++.h>
using namespace std;

bool valid(string x)
{
	assert(x.size());
	for (int i = 0; i < x.size() - 1; i++)
		if (abs(x[i] - x[i+1]) == 1)
			return false;
	return true;
}

int main()
{
	srand(time(NULL));
	int T;
	cin >> T;
	while (T--)
	{
		string x;
		cin >> x;
		bool found = false;
		for (int i = 0; i < 12000; i++)
		{
			random_shuffle(x.begin(), x.end());
			if (valid(x))
			{
				cout << x << '\n';
				found = true;
				break;
			}
		}
		if (!found)
			cout << "No answer\n";
	}
}


#include <bits/stdc++.h>
using namespace std;

bool valid(string x)
{
	assert(x.size());
	for (int i = 0; i < x.size() - 1; i++)
		if (abs(x[i] - x[i+1]) == 1)
			return false;
	return true;
}

int main()
{
	srand(time(NULL));
	int T;
	cin >> T;
	while (T--)
	{
		string x;
		cin >> x;
		bool found = false;
		for (int i = 0; i < 12500; i++)
		{
			random_shuffle(x.begin(), x.end());
			if (valid(x))
			{
				cout << x << '\n';
				found = true;
				break;
			}
		}
		if (!found)
			cout << "No answer\n";
	}
}


#include <bits/stdc++.h>
using namespace std;

bool valid(string x)
{
	assert(x.size());
	for (int i = 0; i < x.size() - 1; i++)
		if (abs(x[i] - x[i+1]) == 1)
			return false;
	return true;
}

int main()
{
	int T;
	cin >> T;
	while (T--)
	{
		string x;
		cin >> x;
		bool found = false;
		for (int i = 0; i < 10000; i++)
		{
			random_shuffle(x.begin(), x.end());
			if (valid(x))
			{
				cout << x << '\n';
				found = true;
				break;
			}
		}
		if (!found)
			cout << "No answer\n";
	}
}


#include <bits/stdc++.h>
using namespace std;

bool valid(string x)
{
	assert(x.size());
	for (int i = 0; i < x.size() - 1; i++)
		if (abs(x[i] - x[i+1]) == 1)
			return false;
	return true;
}

int main()
{
	int T;
	cin >> T;
	while (T--)
	{
		string x;
		cin >> x;
		bool found = false;
		for (int i = 0; i < 50000; i++)
		{
			random_shuffle(x.begin(), x.end());
			if (valid(x))
			{
				cout << x << '\n';
				found = true;
				break;
			}
		}
		if (!found)
			cout << "No answer\n";
	}
}


#include <bits/stdc++.h>
using namespace std;

int cnt[150];
vector<char> events;

void rip()
{
	cout << "No answer";
}

bool all_adjacent(vector<char> v)
{
	for (int i = 1; i < v.size(); i++)
		if (v[i] - v[i-1] != 1)
			return false;
	return true;
}

void print(vector<char> v)
{
	for (char e : v)
		for (int i = 0; i < cnt[e]; i++)
			cout << e;
}

int main()
{
	int T;
	cin >> T;
	while (T--)
	{
		for (char e : events)
			cnt[e] = 0;
		events.clear();

		string x;
		cin >> x;
		for (char e : x)
			if (cnt[e]++ == 0)
				events.push_back(e);
		sort(events.begin(), events.end());
		if (events.size() == 1)
			print(events);
		else if (events.size() == 2)
		{
			if (all_adjacent(events))
				rip();
			else
				print(events);
		}
		else if (events.size() == 3)
		{
			if (all_adjacent(events))
				rip();
			else
			{
				vector<char> v = {events[1]};
				if (events[1] - events[0] != 1)
				{
					v.push_back(events[0]);
					v.push_back(events[2]);
				}
				else
				{assert(events[2] - events[1] != 1);
					v.push_back(events[2]);
					v.push_back(events[0]);
				}
				print(v);
			}
		}
		else // events.size() >= 4
		{
			vector<char> v;
			for (int i = 1; i < events.size(); i += 2)
				v.push_back(events[i]);
			for (int i = 0; i < events.size(); i += 2)
				v.push_back(events[i]);
			print(v);
		}
		cout << '\n';
	}
}


#include <bits/stdc++.h>
using namespace std;

bool valid(string x)
{
	assert(x.size());
	for (int i = 0; i < x.size() - 1; i++)
		if (abs(x[i] - x[i+1]) == 1)
			return false;
	return true;
}

int main()
{
	srand(time(NULL));
	int T;
	cin >> T;
	while (T--)
	{
		string x;
		cin >> x;
		bool found = false;
		for (int i = 0; i < 15000; i++)
		{
			random_shuffle(x.begin(), x.end());
			if (valid(x))
			{
				cout << x << '\n';
				found = true;
				break;
			}
		}
		if (!found)
			cout << "No answer\n";
	}
}


#include <bits/stdc++.h>
using namespace std;

int cnt[150];
vector<char> events;

void rip()
{
	cout << "No answer";
}

bool all_adjacent(vector<char> v)
{
	for (int i = 1; i < v.size(); i++)
		if (v[i] - v[i-1] != 1)
			return false;
	return true;
}

void print(vector<char> v)
{
	for (char e : v)
		for (int i = 0; i < cnt[e]; i++)
			cout << e;
}

int main()
{
	int T;
	cin >> T;
	while (T--)
	{
		for (int e : events)
			cnt[e] = 0;
		events.clear();

		string x;
		cin >> x;
		for (char e : x)
			if (cnt[e]++ == 0)
				events.push_back(e);
		sort(events.begin(), events.end());
		if (events.size() == 1)
			print(events);
		else if (events.size() == 2)
		{
			if (all_adjacent(events))
				rip();
			else
				print(events);
		}
		else if (events.size() == 3)
		{
			if (all_adjacent(events))
				rip();
			else
			{
				vector<char> v = {events[1]};
				if (events[1] - events[0] != 1)
				{
					events.push_back(events[0]);
					events.push_back(events[2]);
				}
				else
				{assert(events[2] - events[1] != 1);
					events.push_back(events[2]);
					events.push_back(events[0]);
				}
				print(v);
			}
		}
		else // events.size() >= 4
		{
			vector<char> v;
			for (int i = 1; i < events.size(); i += 2)
				v.push_back(events[i]);
			for (int i = 0; i < events.size(); i += 2)
				v.push_back(events[i]);
			print(v);
		}
		cout << '\n';
	}
}


#include<cstdio>
#include<cstring>
#include<algorithm>
#include<vector>
using namespace std;
typedef long long ll;
const int MAXN = 1e2 + 5;

char s[MAXN];
char p[MAXN];
int q[MAXN], cnt=0;

void solve(void)
{
	scanf("%s",s+1);
	int n = strlen(s+1);

	cnt=0;
	sort(s+1,s+n+1);
	for(int i=1,j=1; i<=n; i=j)
	{
		while(j<=n && s[i]==s[j]) ++j;
		p[++cnt] = s[i];
		q[cnt] = j-i;
	}

	if(cnt>=2 && cnt<=3){ printf("No answer\n"); return;}

	if(cnt==4)
	{
		for(int i=1; i<=q[3]; ++i) putchar(p[3]);
		for(int i=1; i<=q[1]; ++i) putchar(p[1]);
		for(int i=1; i<=q[4]; ++i) putchar(p[4]);
		for(int i=1; i<=q[2]; ++i) putchar(p[2]);
		return;
	}
	for(int i=1; i<=cnt; i+=2)
		for(int j=1; j<=q[i]; ++j) putchar(p[i]);
	for(int i=2; i<=cnt; i+=2)
		for(int j=1; j<=q[i]; ++j) putchar(p[i]);
	putchar('\n');
}

int main(void)
{
	int T;
	scanf("%d",&T);
	while(T--) solve();
	return 0;
}


#include<cstdio>
#include<cstring>
#include<algorithm>
#include<vector>
using namespace std;
typedef long long ll;
const int MAXN = 1e2 + 5;

char s[MAXN];
char p[MAXN];
int q[MAXN], cnt=0;

void solve(void)
{
	scanf("%s",s+1);
	int n = strlen(s+1);

	cnt=0;
	sort(s+1,s+n+1);
	for(int i=1,j=1; i<=n; i=j)
	{
		while(j<=n && s[i]==s[j]) ++j;
		p[++cnt] = s[i];
		q[cnt] = j-i;
	}

	if(cnt>=2 && cnt<=3){ printf("No answer\n"); return;}

	int m = cnt/2, mid = (cnt+1)/2;
	for(int i=1; i<=m; ++i)
	{
		for(int j=1; j<=q[i]; ++j) putchar(p[i]);
		for(int j=1; j<=q[i+mid]; ++j) putchar(p[i+mid]);
	}
	if(mid > m)
		for(int j=1; j<=q[mid]; ++j) putchar(p[mid]);
	putchar('\n');
}

int main(void)
{
	int T;
	scanf("%d",&T);
	while(T--) solve();
	return 0;
}


#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
using namespace std;
typedef long long ll;
const int MAXN = 1e2 + 5;

char s[MAXN];
int t[30 + 5];

inline bool can(string &s)
{
	for(int i=1; i<(int)s.size(); ++i)
		if(s[i]-s[i-1]==-1 || s[i]-s[i-1]==1)
			return 0;
	return 1;
}

void solve(void)
{
	scanf("%s",s+1);
	int n = strlen(s+1);

	for(int i=0; i<26; ++i) t[i] = 0;
	for(int i=1; i<=n; ++i)
		++t[s[i]-'a'];

	string a;
	for(int i=0; i<26; i+=2)
		a += string(t[i], i);

	string b;
	for(int i=1; i<26; i+=2)
		b += string(t[i], i);

	string ss = a+b;
	if(can(ss)) cout<<ss<<endl;
	else
	{
		reverse(b.begin(),b.end());
		ss = a+b;
		if(can(ss)) cout<<ss<<endl;
		else cout<<"No answer"<<endl;
	}
}

int main(void)
{
	int T;
	scanf("%d",&T);
	while(T--) solve();
	return 0;
}


#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
using namespace std;
typedef long long ll;
const int MAXN = 1e2 + 5;

char s[MAXN];
int t[30 + 5];

inline bool can(string &s)
{
	for(int i=1; i<(int)s.size(); ++i)
		if(s[i]-s[i-1]==-1 || s[i]-s[i-1]==1)
			return 0;
	return 1;
}

void solve(void)
{
	scanf("%s",s+1);
	int n = strlen(s+1);

	for(int i=0; i<26; ++i) t[i] = 0;
	for(int i=1; i<=n; ++i)
		++t[s[i]-'a'];

	string a;
	for(int i=0; i<26; i+=2)
		a += string(t[i], i+'a');

	string b;
	for(int i=1; i<26; i+=2)
		b += string(t[i], i+'a');

	string ss = a+b;
	if(can(ss)) cout<<ss<<endl;
	else
	{
		ss = b+a;
		if(can(ss)) cout<<ss<<endl;
		else cout<<"No answer"<<endl;
	}
}

int main(void)
{
	int T;
	scanf("%d",&T);
	while(T--) solve();
	return 0;
}


#include<cstdio>
#include<cstring>
#include<algorithm>
#include<vector>
using namespace std;
typedef long long ll;
const int MAXN = 1e2 + 5;

char s[MAXN];
char p[MAXN];
int q[MAXN], cnt=0;

void solve(void)
{
	scanf("%s",s+1);
	int n = strlen(s+1);

	cnt=0;
	sort(s+1,s+n+1);
	for(int i=1,j=1; i<=n; i=j)
	{
		while(j<=n && s[i]==s[j]) ++j;
		p[++cnt] = s[i];
		q[cnt] = j-i;
	}

	if(cnt>=2 && cnt<=3){ printf("No answer\n"); return;}

	if(cnt==4)
	{
		for(int i=1; i<=q[3]; ++i) putchar(p[3]);
		for(int i=1; i<=q[1]; ++i) putchar(p[1]);
		for(int i=1; i<=q[4]; ++i) putchar(p[4]);
		for(int i=1; i<=q[2]; ++i) putchar(p[2]);
		putchar('\n');
		return;
	}
	for(int i=1; i<=cnt; i+=2)
		for(int j=1; j<=q[i]; ++j) putchar(p[i]);
	for(int i=2; i<=cnt; i+=2)
		for(int j=1; j<=q[i]; ++j) putchar(p[i]);
	putchar('\n');
}

int main(void)
{
	int T;
	scanf("%d",&T);
	while(T--) solve();
	return 0;
}


#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
using namespace std;
typedef long long ll;
const int MAXN = 1e2 + 5;

char s[MAXN];
int t[30 + 5];

inline bool can(string &s)
{
	for(int i=1; i<(int)s.size(); ++i)
		if(s[i]-s[i-1]==-1 || s[i]-s[i-1]==1)
			return 0;
	return 1;
}

void solve(void)
{
	scanf("%s",s+1);
	int n = strlen(s+1);

	for(int i=0; i<26; ++i) t[i] = 0;
	for(int i=1; i<=n; ++i)
		++t[s[i]-'a'];

	string a;
	for(int i=0; i<26; i+=2)
		a += string(t[i], i+'a');

	string b;
	for(int i=1; i<26; i+=2)
		b += string(t[i], i+'a');

	string ss = a+b;
	if(can(ss)) cout<<ss<<endl;
	else
	{
		reverse(b.begin(),b.end());
		ss = a+b;
		if(can(ss)) cout<<ss<<endl;
		else cout<<"No answer"<<endl;
	}
}

int main(void)
{
	int T;
	scanf("%d",&T);
	while(T--) solve();
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

#define config ios_base::sync_with_stdio(false);cout<<setprecision(10);
#define INF 2000000000ll
#define SIZE 100000ll
#define pb push_back

//#define fin cin
//ifstream fin("input.txt",ios::in);
int32_t main()
{
    config
    int t;
    cin>>t;
    while(t--)
    {
        string t1,t2;
        string s;
        cin>>s;
        for(int i=0;i<s.size();i++)
        {
            if(s[i]%2) t1.pb(s[i]);
            else t2.pb(s[i]);
        }
        sort(t1.begin(),t1.end());
        sort(t2.begin(),t2.end());
        if(t1.size()==0||t2.size()==0) cout<<t1+t2<<endl;
        else if(abs(t1[t1.size()-1]-t2[0])>1) cout<<t1+t2;
        else if(abs(t1[0]-t2[t2.size()-1])>1) cout<<t2+t1;
        else cout<<"No answer";
        cout<<endl;
    }
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

#define CONFIG ios_base::sync_with_stdio(false);cout<<setprecision(10);
#define INF 2000000000ll
#define SIZE 100000ll
#define pb push_back
int32_t main()
{
    CONFIG
    int n;
    cin>>n;
    while(n--)
    {
        vector<char> d;
        string s;
        cin>>s;
        string ans="";
        string ss=s;
        sort(ss.begin(),ss.end());
        for(int i=0;i<ss.size();i++)
        {
            d.pb(ss[i]);
            if(d.size()>1&&d[d.size()-1]==d[d.size()-2]) d.pop_back();
            else ss[i]='.';
        }
        for(int i=0;i<d.size();i+=4)
        {
            if(i+1<d.size()) ans.pb(d[i+1]);
            if(i+3<d.size()) ans.pb(d[i+3]);
            ans.pb(d[i]);
            if(i+2<d.size()) ans.pb(d[i+2]);
        }
        for(int i=0;i<ss.size();i++)
        {
            if(ss[i]=='.') continue;
            for(int j=0;j<ans.size();j++)
            {
                if(ans[j]==ss[i])
                {
                    ans.insert(ans.begin()+j,ss[i]);
                    ss[i]='.';
                    break;
                }
            }
        }
        int f=0;
        for(int i=1;i<ans.size();i++)
        {
            if(abs(ans[i]-ans[i-1])==1) f=1;
        }
        if(f==1 || s.size()!=ans.size()) cout<<"No answer"<<endl;
        else cout<<ans<<endl;
    }
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

#define CONFIG ios_base::sync_with_stdio(false);cout<<setprecision(10);
#define INF 2000000000ll
#define SIZE 100000ll
#define pb push_back

int32_t main()
{
    CONFIG
    int n;
    cin>>n;
    while(n--)
    {
        string s;
        cin>>s;

        string ans="";
        ans.pb(s[0]);
        s[0]='.';

        for(int k=0;k<100;k++)
        {
            for(int i=0;i<s.size();i++)
            {
                if(s[i]=='.') continue;
                for(int j=0;j<ans.size();j++)
                {
                    if(ans[j]==s[i])
                    {
                        ans.insert(ans.begin()+j,s[i]);
                        s[i]='.';
                        break;
                    }
                }
                int x=ans.size();
                if(s[i]=='.') continue;
                if(abs(ans[0]-s[i]) != 1)
                {
                    ans.insert(ans.begin(),s[i]);
                    s[i]='.';
                }
                else if(abs(ans[max(x-1,0)]-s[i]) != 1 )
                {
                    ans.pb(s[i]);
                    s[i]='.';
                }
                else
                {
                    int x=ans.size()-1;
                    for(int j=0;j<x;j++)
                    {
                        if(abs(ans[j]-s[i]) != 1 && abs(ans[j+1]-s[i]) != 1)
                        {
                            ans.insert(ans.begin()+j,s[i]);
                            s[i]='.';
                            break;
                        }
                    }
                }
            }
        }

        int f=0;
        for(int i=1;i<ans.size();i++)
        {
            if(abs(ans[i]-ans[i-1])==1) f=1;
        }
        if(f==1 || s.size()!=ans.size()) cout<<"No answer"<<endl;
        else cout<<ans<<endl;
    }
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

#define CONFIG ios_base::sync_with_stdio(false);cout<<setprecision(10);
#define INF 2000000000ll
#define SIZE 100000ll
#define pb push_back

int d[31];
int32_t main()
{
    CONFIG
    int n;
    cin>>n;
    while(n--)
    {
        for(int i=30;i>=0;i--) d[i]=0;
        string s;
        cin>>s;
        for(int i=0;i<s.size();i++)
        {
            d[s[i]-'a']++;
        }
        string t="";
        for(int i=30;i>=0;i-=2)
        {
            for(int j=0;j<d[i];j++) t.pb(i+'a');
        }
        for(int i=29;i>=0;i-=2)
        {
            for(int j=0;j<d[i];j++) t.pb(i+'a');
        }
        int f=0;
        for(int i=1;i<t.size();i++)
        {
            if(abs(t[i]-t[i-1])==1) f=1;
        }
        if(f==1) cout<<"No answer"<<endl;
        else cout<<t<<endl;
    }
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

#define config ios_base::sync_with_stdio(false);cout<<setprecision(10);
#define INF 2000000000ll
#define SIZE 100000ll
#define pb push_back

//#define fin cin
//ifstream fin("input.txt",ios::in);
int32_t main()
{
    config
    int t;
    cin>>t;
    while(t--)
    {
        string t1,t2;
        string s;
        cin>>s;
        for(int i=0;i<s.size();i++)
        {
            if(s[i]%2) t1.pb(s[i]);
            else t2.pb(s[i]);
        }
        sort(t1.begin(),t1.end());
        sort(t2.begin(),t2.end());
        if(t1.size()==0||t2.size()==0) cout<<t1+t2;
        else if(abs(t1[t1.size()-1]-t2[0])>1) cout<<t1+t2;
        else if(abs(t1[0]-t2[t2.size()-1])>1) cout<<t2+t1;
        else cout<<"No answer";
        cout<<endl;
    }
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

#define config ios_base::sync_with_stdio(false);cout<<setprecision(10);
#define INF 2000000000ll
#define SIZE 100000ll
#define pb push_back

//#define fin cin
//ifstream fin("input.txt",ios::in);
int32_t main()
{
    config
    int t;
    cin>>t;
    while(t--)
    {
        string t1,t2;
        string s;
        cin>>s;
        for(int i=0;i<s.size();i++)
        {
            if(s[i]%2) t1.pb(s[i]);
            else t2.pb(s[i]);
        }
        sort(t1.begin(),t1.end());
        sort(t2.begin(),t2.end());
        if(t1.size()==0||t2.size()==0) cout<<t1+t2<<endl;
        if(abs(t1[t1.size()-1]-t2[0])>1) cout<<t1+t2;
        else if(abs(t1[0]-t2[t2.size()-1])>1) cout<<t2+t1;
        else cout<<"No answer";
        cout<<endl;
    }
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

#define INF 2000000000ll
#define SIZE 100000ll
#define pb push_back
//#define fin cin
int main()
{
  ifstream fin("input.txt",ios::in);
	ios_base::sync_with_stdio(false);
  cout<<setprecision(10);
  int n;
  cin>>n;
  while(n--)
  {
    string s;
    cin>>s;
    int d[30];
    for(int i=0;i<30;i++) d[i]=0;
    for(int i=0;i<s.size();i++)
    {
      d[s[i]-'a']++;
    }
    string t="";
    for(int i=0;i<'z'-'a';i+=2)
    {
      for(int j=0;j<d[i];j++)
      {
        string x="a";
        x[0]+=i;
        t+=x;
      }
    }
    for(int i='z'-'a';i>0;i-=2)
    {
      for(int j=0;j<d[i];j++)
      {
        string x="a";
        x[0]+=i;
        t+=x;
      }
    }
    cout<<t<<endl;
  }
}


#include<bits/stdc++.h>
using namespace std;
string s;
char a[101],b[101];
int fa,fb;
int main()
{
    int t;
    cin>>t;
    while (t--)
    {
        //cout<<0<<endl;
        cin>>s;
        fa=fb=-1;
        //cout<<1<<endl;
		memset(a,'\0',sizeof(a));
		memset(b,'\0',sizeof(b));
        //cout<<2<<endl;
        for(int x=0;x<=s.size()-1;x++)
        if(s[x]%2==1)fa++,a[fa]=s[x]/*,cout<<s[x]<<endl*/;
        else fb++,b[fb]=s[x]/*,cout<<s[x]<<endl*/;
        fa=max(fa,0);
        fb=max(fb,0);
        //cout<<3<<endl;
        sort(a+1,a+1+fa);
        sort(b+1,b+1+fb);
        //cout<<4<<endl;
		//cout<<a<<endl<<b<<endl<<fa<<endl<<fb<<endl<<a[fa]<<endl;
        if(abs(a[fa]-b[0])!=1/*&&abs(a[fa]-b[0])!='z'-'a'*/){
            cout<<a<<b<<endl;
            continue;
        }
        //cout<<5<<endl;
        if(abs(a[0]-b[fb])!=1/*&&abs(a[0]-b[fb])!='z'-'a'*/){
            cout<<b<<a<<endl;
            continue;
        }
        cout<<"No answer\n";
    }
}


#include<bits/stdc++.h>
using namespace std;
string s,a,b;
int sum[101];
int main()
{
    int t;
    cin>>t;
    while (t--)
    {
        //cout<<0<<endl;
        cin>>s;
        //cout<<1<<endl;
		a=b="";
        //cout<<2<<endl;
        for(int x='a';x<='z';x++)
        sum[x]=0;
        for(long unsigned int x=0;x<s.size();x++)
        if('a'<=s[x]&&s[x]<='z')
        sum[(int)(s[x])]++;
        //cout<<3<<endl;
        for(char x='a';x<='z';x++)
        for(int y=1;y<=(int)sum[x];y++)
        if((int)(x)%2==1)a+=x;
        else b+=x;
        if(a.size()==0||b.size()==0){
            cout<<s<<endl;
            continue;
        }
        /*for(int x='a';x<='z';x++)
        cout<<sum[x]<<' ';
        cout<<endl;*/
        //cout<<s+','+a+','+b<<endl;
        //cout<<4<<endl;
		//cout<<a<<endl<<b<<endl<<fa<<endl<<fb<<endl<<a[fa]<<endl;
        if(abs(a[a.size()-1]-b[0])!=1/*&&abs(a[fa]-b[0])!='z'-'a'*/){
            cout<<a+b<<endl;
            continue;
        }
        //cout<<5<<endl;
        if(abs(a[0]-b[b.size()-1])!=1/*&&abs(a[0]-b[fb])!='z'-'a'*/){
            cout<<b+a<<endl;
            continue;
        }
        cout<<"No answer\n";
    }
}


#include<bits/stdc++.h>
using namespace std;
string s;
char a[101],b[101];
int fa,fb;
int main()
{
    int t;
    cin>>t;
    while (t--)
    {
        //cout<<0<<endl;
        cin>>s;
        fa=fb=-1;
        //cout<<1<<endl;
		memset(a,'\0',sizeof(a));
		memset(b,'\0',sizeof(b));
        //cout<<2<<endl;
        for(int x=0;x<=s.size()-1;x++)
        if(s[x]%2==1)fa++,a[fa]=s[x]/*,cout<<s[x]<<endl*/;
        else fb++,b[fb]=s[x]/*,cout<<s[x]<<endl*/;
        fa=max(fa,0);
        fb=max(fb,0);
        //cout<<3<<endl;
        sort(a+1,a+1+fa);
        sort(b+1,b+1+fb);
        //cout<<4<<endl;
		//cout<<a<<endl<<b<<endl<<fa<<endl<<fb<<endl<<a[fa]<<endl;
        if(abs(a[fa]-b[0])!=1&&abs(a[fa]-b[0])!='z'-'a'){
            cout<<a<<b<<endl;
            continue;
        }
        //cout<<5<<endl;
        if(abs(a[0]-b[fb])!=1&&abs(a[0]-b[fb])!='z'-'a'){
            cout<<b<<a<<endl;
            continue;
        }
        cout<<"No answer\n";
    }
}


#include<bits/stdc++.h>
using namespace std;
string s,a,b;
int sum[101];
int main()
{
    int t;
    cin>>t;
    while (t--)
    {
        //cout<<0<<endl;
        cin>>s;
        //cout<<1<<endl;
		a=b="";
        //cout<<2<<endl;
        for(int x='a';x<='z';x++)
        sum[x]=0;
        for(long unsigned int x=0;x<s.size();x++)
        if('a'<=s[x]&&s[x]<='z')
        sum[(int)(s[x])]++;
        //cout<<3<<endl;
        for(int x='a';x<='z';x++)
        for(int y=1;y<=sum[x];y++)
        if(x%2==1)a+=x;
        else b+=x;
        /*for(int x='a';x<='z';x++)
        cout<<sum[x]<<' ';
        cout<<endl;*/
        //cout<<s+','+a+','+b<<endl;
        //cout<<4<<endl;
		//cout<<a<<endl<<b<<endl<<fa<<endl<<fb<<endl<<a[fa]<<endl;
        if(abs(a[a.size()-1]-b[0])!=1/*&&abs(a[fa]-b[0])!='z'-'a'*/){
            cout<<a+b<<endl;
            continue;
        }
        //cout<<5<<endl;
        if(abs(a[0]-b[b.size()-1])!=1/*&&abs(a[0]-b[fb])!='z'-'a'*/){
            cout<<b+a<<endl;
            continue;
        }
        cout<<"No answer\n";
    }
}


#include<bits/stdc++.h>
using namespace std;
string s;
char a[101],b[101];
int fa,fb;
int main()
{
    int t;
    cin>>t;
    while (t--)
    {
        //cout<<0<<endl;
        cin>>s;
        fa=fb=-1;
        //cout<<1<<endl;
		memset(a,'\0',sizeof(a));
		memset(b,'\0',sizeof(b));
        //cout<<2<<endl;
        for(int x=0;x<=s.size()-1;x++)
        if(s[x]%2==1)fa++,a[fa]=s[x]/*,cout<<s[x]<<endl*/;
        else fb++,b[fb]=s[x]/*,cout<<s[x]<<endl*/;
        if(fa==-1||fb==-1){
            cout<<s<<endl;
            continue;
        }
        //cout<<3<<endl;
        sort(a+1,a+1+fa);
        sort(b+1,b+1+fb);
        //cout<<4<<endl;
		//cout<<a<<endl<<b<<endl<<fa<<endl<<fb<<endl<<a[fa]<<endl;
        if(abs(a[fa]-b[0])!=1/*&&abs(a[fa]-b[0])!='z'-'a'*/){
            cout<<a<<b<<endl;
            continue;
        }
        //cout<<5<<endl;
        if(abs(a[0]-b[fb])!=1/*&&abs(a[0]-b[fb])!='z'-'a'*/){
            cout<<b<<a<<endl;
            continue;
        }
        cout<<"No answer\n";
    }
}


#include<bits/stdc++.h>
using namespace std;
string s,a,b;
int sum[101];
int main()
{
    int t;
    cin>>t;
    while (t--)
    {
        //cout<<0<<endl;
        cin>>s;
        //cout<<1<<endl;
		a=b="";
        //cout<<2<<endl;
        for(int x='a';x<='z';x++)
        sum[x]=0;
        for(long unsigned int x=0;x<s.size();x++)
        if('a'<=s[x]&&s[x]<='z')
        sum[(int)(s[x])]++;
        //cout<<3<<endl;
        for(int x='a';x<='z';x++)
        for(int y=1;y<=sum[x];y++)
        if(x%2==1)a+=x;
        else b+=x;
        if(a.size()==0||b.size()==0){
            cout<<s<<endl;
            continue;
        }
        /*for(int x='a';x<='z';x++)
        cout<<sum[x]<<' ';
        cout<<endl;*/
        //cout<<s+','+a+','+b<<endl;
        //cout<<4<<endl;
		//cout<<a<<endl<<b<<endl<<fa<<endl<<fb<<endl<<a[fa]<<endl;
        if(abs(a[a.size()-1]-b[0])!=1/*&&abs(a[fa]-b[0])!='z'-'a'*/){
            cout<<a+b<<endl;
            continue;
        }
        //cout<<5<<endl;
        if(abs(a[0]-b[b.size()-1])!=1/*&&abs(a[0]-b[fb])!='z'-'a'*/){
            cout<<b+a<<endl;
            continue;
        }
        cout<<"No answer\n";
    }
}


#include<iostream>
#include<cstring>
using namespace std;
string a,b,c;
int sum[30];
int main()
{
    int t;
    cin>>t;
    while (t--)
    {
        b=c="";
        cin>>a;
		for(int x=0;x<=26;x++)
			sum[x]=0;
        for(int x=0;x<(int)(a.size());x++)
			sum[a[x]-'a']++;
        for(int x=0;x<26;x+=2)
			for(int y=1;y<=sum[x];y++)
				c+=x+'a';
        for(int x=1;x<26;x+=2)
			for(int y=1;y<=sum[x];y++)
				b+=x+'a';
        if(abs(b[0]-c[c.size()-1])>1)
		{
			cout<<c+b<<endl;
			continue;
		}
        if(abs(c[0]-b[b.size()-1])>1)
		{
			cout<<b+c<<endl;
			continue;
		}
        cout<<"No answer\n";
    }
}/*
#include<bits/stdc++.h>
using namespace std;
string s,a,b;
int sum[101];
int main()
{
    int t;
    cin>>t;
    while (t--)
    {
        //cout<<0<<endl;
        cin>>s;
        //cout<<1<<endl;
		a=b="";
        //cout<<2<<endl;
        for(int x='a';x<='z';x++)
        sum[x]=0;
        for(long unsigned int x=0;x<s.size();x++)
        if('a'<=s[x]&&s[x]<='z')
        sum[(int)(s[x])]++;
        //cout<<3<<endl;
        for(char x='a';x<='z';x++)
        for(int y=1;y<=(int)sum[x];y++)
        if((int)(x)%2==1)a+=x;
        else b+=x;
        if(a.size()==0||b.size()==0){
            cout<<s<<endl;
            continue;
        }
        /*for(int x='a';x<='z';x++)
        cout<<sum[x]<<' ';
        cout<<endl;*/
        //cout<<s+','+a+','+b<<endl;
        //cout<<4<<endl;
		//cout<<a<<endl<<b<<endl<<fa<<endl<<fb<<endl<<a[fa]<<endl;
//        if(abs(a[a.size()-1]-b[0])!=1/*&&abs(a[fa]-b[0])!='z'-'a'*/){
/*            cout<<a+b<<endl;
            continue;
        }
        //cout<<5<<endl;
*///        if(abs(a[0]-b[b.size()-1])!=1/*&&abs(a[0]-b[fb])!='z'-'a'*/){
/*            cout<<b+a<<endl;
            continue;
        }
        cout<<"No answer\n";
    }
}*/


#include<bits/stdc++.h>
using namespace std;
string s;
char a[1000],b[1000];
int fa,fb;
int main()
{
    int t;
    cin>>t;
    while (t--)
    {
        //cout<<0<<endl;
        cin>>s;
        fa=fb=-1;
        //cout<<1<<endl;
		memset(a,'\0',sizeof(a));
		memset(b,'\0',sizeof(b));
        //cout<<2<<endl;
        for(int x=0;x<=s.size()-1;x++)
        if('a'<=s[x]&&a[x]<='z')
        if(s[x]%2==1)fa++,a[fa]=s[x]/*,cout<<s[x]<<endl*/;
        else fb++,b[fb]=s[x]/*,cout<<s[x]<<endl*/;
        if(fa==-1||fb==-1){
            cout<<s<<endl;
            continue;
        }
        //cout<<3<<endl;
        sort(a+1,a+1+fa);
        sort(b+1,b+1+fb);
        //cout<<4<<endl;
		//cout<<a<<endl<<b<<endl<<fa<<endl<<fb<<endl<<a[fa]<<endl;
        if(abs(a[fa]-b[0])!=1/*&&abs(a[fa]-b[0])!='z'-'a'*/){
            cout<<a<<b<<endl;
            continue;
        }
        //cout<<5<<endl;
        if(abs(a[0]-b[fb])!=1/*&&abs(a[0]-b[fb])!='z'-'a'*/){
            cout<<b<<a<<endl;
            continue;
        }
        cout<<"No answer\n";
    }
}


#include<bits/stdc++.h>
//#include<ext/pb_ds/assoc_container.hpp>
using namespace std;
//using namespace __gnu_pbds;
const int inf=0x3f3f3f3f;
const double eps=1e-6;
const int mod=1000000007;
typedef long long ll;
int modpow(int x,int y,int md=mod){if(y==0)return 1;int ret=modpow(x,y>>1,md);ret=(ll)ret*ret%md;if(y&1)ret=(ll)ret*x%md;return ret;}
int T;
string s;
inline bool check(string &_s){
	for(int i=1;i<_s.size();i++){
		if(s[i]-s[i-1]==1 || s[i]-s[i-1]==-1)return false;
	}
	return true;
}
int main(){
	cin>>T;
	while(T--){
		cin>>s;
		string even,odd;
		for(char c:s){
			if(c&1)odd.push_back(c);
			else even.push_back(c);
		}
		if(check(odd+even))cout<<odd+even<<endl;
		else if(check(even+odd))cout<<even+odd<<endl;
		else cout<<"No answer"<<endl;
	}
	return 0;
}


#include<bits/stdc++.h>
//#include<ext/pb_ds/assoc_container.hpp>
using namespace std;
//using namespace __gnu_pbds;
const int inf=0x3f3f3f3f;
const double eps=1e-6;
const int mod=1000000007;
typedef long long ll;
int modpow(int x,int y,int md=mod){if(y==0)return 1;int ret=modpow(x,y>>1,md);ret=(ll)ret*ret%md;if(y&1)ret=(ll)ret*x%md;return ret;}
int T;
string s;
inline bool check(string &_s){
	for(int i=1;i<_s.size();i++){
		if(_s[i]-_s[i-1]==1 || _s[i]-_s[i-1]==-1)return false;
	}
	return true;
}
int main(){
	cin>>T;
	while(T--){
		cin>>s;bool ans=false;
		for(int i=1;i<=10000;i++){
			if(check(s)){
				ans=true;
				break;
			}
			random_shuffle(s.begin(),s.end());
		}
		if(ans)cout<<s<<endl;
		else cout<<"No answer"<<endl;
	}
	return 0;
}


#include<bits/stdc++.h>
//#include<ext/pb_ds/assoc_container.hpp>
using namespace std;
//using namespace __gnu_pbds;
const int inf=0x3f3f3f3f;
const double eps=1e-6;
const int mod=1000000007;
typedef long long ll;
int modpow(int x,int y,int md=mod){if(y==0)return 1;int ret=modpow(x,y>>1,md);ret=(ll)ret*ret%md;if(y&1)ret=(ll)ret*x%md;return ret;}
int T;
string s;
inline bool check(string &_s){
	for(int i=1;i<_s.size();i++){
		if(s[i]-s[i-1]==1 || s[i]-s[i-1]==-1)return false;
	}
	return true;
}
int main(){
	cin>>T;
	while(T--){
		cin>>s;bool ans=false;
		for(int i=1;i<=10000;i++){
			if(check(s)){
				ans=true;
				break;
			}
			random_shuffle(s.begin(),s.end());
		}
		if(ans)cout<<s<<endl;
		else cout<<"No answer"<<endl;
	}
	return 0;
}


#include<bits/stdc++.h>
//#include<ext/pb_ds/assoc_container.hpp>
using namespace std;
//using namespace __gnu_pbds;
const int inf=0x3f3f3f3f;
const double eps=1e-6;
const int mod=1000000007;
typedef long long ll;
int modpow(int x,int y,int md=mod){if(y==0)return 1;int ret=modpow(x,y>>1,md);ret=(ll)ret*ret%md;if(y&1)ret=(ll)ret*x%md;return ret;}
int T;
string s;
inline bool check(string _s){
	for(int i=1;i<_s.size();i++){
		if(s[i]-s[i-1]==1 || s[i]-s[i-1]==-1)return false;
	}
	return true;
}
int main(){
	cin>>T;
	while(T--){
		cin>>s;
		string even,odd;
		for(char c:s){
			if(c&1)odd.push_back(c);
			else even.push_back(c);
		}
		if(check(odd+even))cout<<odd+even<<endl;
		else if(check(even+odd))cout<<even+odd<<endl;
		else cout<<"No answer"<<endl;
	}
	return 0;
}


#include<bits/stdc++.h>
//#include<ext/pb_ds/assoc_container.hpp>
using namespace std;
//using namespace __gnu_pbds;
const int inf=0x3f3f3f3f;
const double eps=1e-6;
const int mod=1000000007;
typedef long long ll;
int modpow(int x,int y,int md=mod){if(y==0)return 1;int ret=modpow(x,y>>1,md);ret=(ll)ret*ret%md;if(y&1)ret=(ll)ret*x%md;return ret;}
int T;
string s;
inline bool check(string _s){
	for(int i=1;i<_s.size();i++){
		if((int)_s[i]-_s[i-1]==1 || (int)_s[i]-_s[i-1]==-1)return false;
	}
	return true;
}
int main(){
	cin>>T;
	while(T--){
		cin>>s;
		string even="",odd="";
		for(char c:s){
			if(c&1)odd.push_back(c);
			else even.push_back(c);
		}
		sort(even.begin(),even.end());
		sort(odd.begin(),odd.end());
		cerr<<odd<<" "<<even<<endl;
		if(check(odd+even))cout<<odd+even<<endl;
		else if(check(even+odd))cout<<even+odd<<endl;
		else cout<<"No answer"<<endl;
	}
	return 0;
}


#include<bits/stdc++.h>
//#include<ext/pb_ds/assoc_container.hpp>
using namespace std;
//using namespace __gnu_pbds;
const int inf=0x3f3f3f3f;
const double eps=1e-6;
const int mod=1000000007;
typedef long long ll;
int modpow(int x,int y,int md=mod){if(y==0)return 1;int ret=modpow(x,y>>1,md);ret=(ll)ret*ret%md;if(y&1)ret=(ll)ret*x%md;return ret;}
int T;
string s;
inline bool check(string _s){
	for(int i=1;i<_s.size();i++){
		if(s[i]-s[i-1]==1 || s[i]-s[i-1]==-1)return false;
	}
	return true;
}
int main(){
	cin>>T;
	while(T--){
		cin>>s;
		string even,odd;
		for(char c:s){
			if(c&1)odd.push_back(c);
			else even.push_back(c);
		}
		sort(even.begin(),even.end());
		sort(odd.begin(),odd.end());
		if(check(odd+even))cout<<odd+even<<endl;
		else if(check(even+odd))cout<<even+odd<<endl;
		else cout<<"No answer"<<endl;
	}
	return 0;
}


#include <iostream>
#include <string>
#include <vector>

using namespace std;
const int N = 150;
int n;
string s;

int main() {
    cin >> n;
    for (int i=0; i<n; ++i) {
        cin >> s;
        vector<char> a[2];
        sort(a[0].begin(), a[0].end());
        sort(a[1].begin(), a[1].end());
        for (int i=0; i<s.size(); ++i) {
            a[s[i]%2].push_back(s[i]);
        }
        if (a[0].size() == 0) {
            for (int i=0; i<a[1].size(); ++i)
                cout << a[1][i];
        }
        else if (a[1].size() == 0) {
            for (int i=0; i<a[0].size(); ++i)
                cout << a[0][i];
        } else if (abs(a[0][0]-a[1][a[1].size()-1]) != 1) {
            for (int i=0; i<a[1].size(); ++i)
                cout << a[1][i];
            for (int i=0; i<a[0].size(); ++i)
                cout << a[0][i];
        }
        else if (abs(a[0][a[0].size()-1]-a[1][0]) != 1) {
            for (int i=0; i<a[0].size(); ++i)
                cout << a[0][i];
            for (int i=0; i<a[1].size(); ++i)
                cout << a[1][i];
        }
        else cout << "No answer";
        cout << endl;
    }
    return 0;
}


#include <iostream>
#include <string>
#include <vector>

using namespace std;
const int N = 150;
int n;
string s;

int main() {
    cin >> n;
    for (int i=0; i<n; ++i) {
        cin >> s;
        vector<char> a[2];
        for (int i=0; i<s.size(); ++i) {
            a[s[i]%2].push_back(s[i]);
        }
        if (a[0].size() == 0) {
            for (int i=0; i<a[1].size(); ++i)
                cout << a[1][i];
        }
        else if (a[1].size() == 0) {
            for (int i=0; i<a[0].size(); ++i)
                cout << a[0][i];
        } else if (abs(a[0][0]-a[1][a[1].size()-1]) != 1) {
            for (int i=0; i<a[1].size(); ++i)
                cout << a[1][i];
            for (int i=0; i<a[0].size(); ++i)
                cout << a[0][i];
        }
        else if (abs(a[0][a[0].size()-1]-a[1][0]) != 1) {
            for (int i=0; i<a[0].size(); ++i)
                cout << a[0][i];
            for (int i=0; i<a[1].size(); ++i)
                cout << a[1][i];
        }
        else cout << "No answer";
        cout << endl;
    }
    return 0;
}


#include <iostream>
#include <string>
#include <vector>
#include <algorithm>

using namespace std;
const int N = 150;
int n;
string s;

int main() {
    cin >> n;
    for (int i=0; i<n; ++i) {
        cin >> s;
        vector<char> a[2];
        for (int i=0; i<s.size(); ++i) {
            a[s[i]%2].push_back(s[i]);
        }
        sort(a[0].begin(), a[0].end());
        sort(a[1].begin(), a[1].end());
        if (a[0].size() == 0) {
            for (int i=0; i<a[1].size(); ++i)
                cout << a[1][i];
        }
        else if (a[1].size() == 0) {
            for (int i=0; i<a[0].size(); ++i)
                cout << a[0][i];
        } else if (abs(a[0].front()-a[1].back()) != 1) {
            for (int i=0; i<a[1].size(); ++i)
                cout << a[1][i];
            for (int i=0; i<a[0].size(); ++i)
                cout << a[0][i];
        }
        else if (abs(a[0].back()-a[1].front()) != 1) {
            for (int i=0; i<a[0].size(); ++i)
                cout << a[0][i];
            for (int i=0; i<a[1].size(); ++i)
                cout << a[1][i];
        }
        else cout << "No answer";
        cout << endl;
    }
    return 0;
}


#include <iostream>
#include <string>
#include <vector>
#include <algorithm>

using namespace std;
const int N = 150;
int n;
string str;

int check(string s) {
    int res = true;
    for (int i=1; i<s.length(); ++i)
        res &= abs(s[i]-s[i-1]) != 1;
    return res;
}

int main() {
    cin >> n;
    for (int i=0; i<n; ++i) {
        cin >> str;
        vector<char> a[2];
        string s[2];
        s[0] = "";
        s[1] = "";
        for (int i=0; i<str.length(); ++i) {
            s[str[i]%2] += str[i];
        }
        sort(s[0].begin(), s[0].end());
        sort(s[1].begin(), s[1].end());
        if (check(s[0]+s[1]))
            cout << s[0]+s[1] << endl;
        else if (check(s[1]+s[0]))
            cout << s[1]+s[0] << endl;
        else cout << "No answer" << endl;
    }
    return 0;
}


#include <iostream>
#include <string>
#include <vector>
#include <algorithm>

using namespace std;
const int N = 150;
int n;
string s;

int main() {
    cin >> n;
    for (int i=0; i<n; ++i) {
        cin >> s;
        vector<char> a[2];
        sort(a[0].begin(), a[0].end());
        sort(a[1].begin(), a[1].end());
        for (int i=0; i<s.size(); ++i) {
            a[s[i]%2].push_back(s[i]);
        }
        if (a[0].size() == 0) {
            for (int i=0; i<a[1].size(); ++i)
                cout << a[1][i];
        }
        else if (a[1].size() == 0) {
            for (int i=0; i<a[0].size(); ++i)
                cout << a[0][i];
        } else if (abs(a[0][0]-a[1][a[1].size()-1]) != 1) {
            for (int i=0; i<a[1].size(); ++i)
                cout << a[1][i];
            for (int i=0; i<a[0].size(); ++i)
                cout << a[0][i];
        }
        else if (abs(a[0][a[0].size()-1]-a[1][0]) != 1) {
            for (int i=0; i<a[0].size(); ++i)
                cout << a[0][i];
            for (int i=0; i<a[1].size(); ++i)
                cout << a[1][i];
        }
        else cout << "No answer";
        cout << endl;
    }
    return 0;
}


#include <iostream>
#include <string>
#include <vector>
#include <algorithm>

using namespace std;
const int N = 150;
int n;
string s;

int main() {
    cin >> n;
    for (int i=0; i<n; ++i) {
        cin >> s;
        vector<char> a[2];
        sort(a[0].begin(), a[0].end());
        sort(a[1].begin(), a[1].end());
        for (int i=0; i<s.size(); ++i) {
            a[s[i]%2].push_back(s[i]);
        }
        if (a[0].size() == 0) {
            for (int i=0; i<a[1].size(); ++i)
                cout << a[1][i];
        }
        else if (a[1].size() == 0) {
            for (int i=0; i<a[0].size(); ++i)
                cout << a[0][i];
        } else if (abs(a[0].front()-a[1].back()) != 1) {
            for (int i=0; i<a[1].size(); ++i)
                cout << a[1][i];
            for (int i=0; i<a[0].size(); ++i)
                cout << a[0][i];
        }
        else if (abs(a[0].back()-a[1].front()) != 1) {
            for (int i=0; i<a[0].size(); ++i)
                cout << a[0][i];
            for (int i=0; i<a[1].size(); ++i)
                cout << a[1][i];
        }
        else cout << "No answer";
        cout << endl;
    }
    return 0;
}


#include <vector>
#include <iostream>
#include <algorithm>
#include <math.h>
#include <set>
#include <string>
using namespace std;

typedef long long int ill;
typedef unsigned long long int ull;

#define forn(i,a,b) for(unsigned long long int i=(a);i<(b);++i)

int main(){
	ios::sync_with_stdio(false);
	cin.tie(NULL);

	ull T;
	cin >> T;

	string alpha = "abcdefghijklmnopqrstuvwxyz";
	forn(k,0,T){
		string s;
		cin >> s;
		ull letras[26];
		forn(i,0,26)
			letras[i] = 0;
		forn(i,0,s.size()){
			letras[s[i]-'a']++;
		}
		ull cant = 0;
		forn(i,0,26){
			if(letras[i])
				cant++;
		}
		bool resp = true;

		if(cant<=3){
			forn(i,0,26){
				if(letras[i]){
					if(letras[i+1] && letras[i+2]){
						cout<<"No answer"<<"\n";
						resp = false;
					}
					if(letras[i+1] && cant==2){
						cout<<"No answer"<<"\n";
						resp = false;
					}
					if(cant==1){
						forn(j,0,letras[i])
							cout<<alpha[i];
						cout<<"\n";
						resp = false;
					}
					break;
				}
			}
		}
		if(resp){
			string r;
			int inicio;
			forn(i,0,26){
				if(letras[i]){
					inicio = i;
					break;
				}
			}
			for(int i = inicio+1;i < 26;i+=2){
				forn(j,0,letras[i]){
					r+=alpha[i];
				}
			}
			for(int i = inicio;i < 26;i+=2){
				forn(j,0,letras[i]){
					r+=alpha[i];
				}
			}
		cout<<r<<"\n";
		}
	}
}


#include <vector>
#include <iostream>
#include <algorithm>
#include <math.h>
#include <set>
#include <string>
using namespace std;

typedef long long int ill;
typedef unsigned long long int ull;

#define forn(i,a,b) for(unsigned long long int i=(a);i<(b);++i)

int main(){
	ios::sync_with_stdio(false);
	cin.tie(NULL);

	ull T;
	cin >> T;

	string alpha = "abcdefghijklmnopqrstuvwxyz";
	forn(k,0,T){
		string s;
		cin >> s;
		ull letras[26];
		forn(i,0,26)
			letras[i] = 0;
		forn(i,0,s.size()){
			letras[s[i]-'a']++;
		}
		ull cant = 0;
		forn(i,0,26){
			if(letras[i])
				cant++;
		}
		bool resp = true;

		if(cant<=3){
			forn(i,0,26){
				if(letras[i]){
					if(letras[i+1] && letras[i+2]){
						cout<<"No answer"<<"\n";
						resp = false;
					}
					if(letras[i+1] && cant==2){
						cout<<"No answer"<<"\n";
						resp = false;
					}
					if(cant==1){
						forn(j,0,letras[i])
							cout<<alpha[i];
						cout<<"\n";
						resp = false;
					}
					break;
				}
			}
		}
		if(resp){
			string r;
			int inicio;
			forn(i,0,26){
				if(letras[i]){
					inicio = i;
					break;
				}
			}
			forn(i,0,letras[inicio]){
				r+=alpha[inicio];
			}
			bool adelante = true;
			forn(i,inicio+2,26){
				if(letras[i]){
					if(adelante){
						adelante = false;
						forn(j,0,letras[i]){
							r+=alpha[i];
						}
					} else {
						adelante = true;
						string nuevaR;
						forn(j,0,letras[i]){
							nuevaR+=alpha[i];
						}
						r = nuevaR+r;
					}
				}
			}
			if(letras[inicio+1]){
				forn(i,0,r.size()+1){
					int l = 2;
					int d = 2;
					if (i>0){
						l = r[i-1]-alpha[inicio+1];
					}
					if (i<r.size()){
						d = r[i]-alpha[inicio+1];
					}
					if((l>1 || l<-1) && (d>1 || d<-1)){
						string nuevaR;
						forn(j,0,i){
							nuevaR+=r[j];
						}
						forn(j,0,letras[inicio+1]){
							nuevaR+=alpha[inicio+1];
						}
						forn(j,i,r.size()){
							nuevaR+=r[j];
						}
						r = nuevaR;
						break;
					}
				}
			}
		cout<<r<<"\n";
		}
	}
}


#include <vector>
#include <iostream>
#include <algorithm>
#include <math.h>
#include <set>
#include <string>
using namespace std;

typedef long long int ill;
typedef unsigned long long int ull;

#define forn(i,a,b) for(unsigned long long int i=(a);i<(b);++i)

int main(){
	ios::sync_with_stdio(false);
	cin.tie(NULL);

	ull T;
	cin >> T;

	string alpha = "abcdefghijklmnopqrstuvwxyz";
	forn(k,0,T){
		string s;
		cin >> s;
		ull letras[26];
		forn(i,0,26)
			letras[i] = 0;
		forn(i,0,s.size()){
			letras[s[i]-'a']++;
		}
		ull cant = 0;
		forn(i,0,26){
			if(letras[i])
				cant++;
		}
		bool resp = true;

		if(cant<=3){
			forn(i,0,26){
				if(letras[i]){
					if(letras[i+1] && letras[i+2]){
						cout<<"No answer"<<"\n";
						resp = false;
					}
					if(letras[i+1] && cant==2){
						cout<<"No answer"<<"\n";
						resp = false;
					}
					if(cant==1){
						forn(j,0,letras[i])
							cout<<alpha[i];
						cout<<"\n";
						resp = false;
					}
					break;
				}
			}
		}
		if(resp){
			string r;
			int inicio;
			forn(i,0,26){
				if(letras[i]){
					inicio = i;
					break;
				}
			}
			forn(i,0,letras[inicio]){
				r+=alpha[inicio];
			}
			bool adelante = true;
			forn(i,inicio+2,26){
				if(letras[i]){
					if(adelante){
						adelante = false;
						forn(j,0,letras[i]){
							r+=alpha[i];
						}
					} else {
						adelante = true;
						string nuevaR;
						forn(j,0,letras[i]){
							nuevaR+=alpha[i];
						}
						r = nuevaR+r;
					}
				}
			}
			if(inicio!= 25 && letras[inicio+1]){
				forn(i,0,r.size()+1){
					int l = 2;
					int d = 2;
					if (i>0){
						l = r[i-1]-alpha[inicio+1];
					}
					if (i<r.size()){
						d = r[i]-alpha[inicio+1];
					}
					if((l>1 || l<-1) && (d>1 || d<-1)){
						string nuevaR;
						forn(j,0,i){
							nuevaR+=r[j];
						}
						forn(j,0,letras[inicio+1]){
							nuevaR+=alpha[inicio+1];
						}
						forn(j,i,r.size()){
							nuevaR+=r[j];
						}
						r = nuevaR;
						break;
					}
				}
			}
		cout<<r<<"\n";
		}
	}
}


#include <vector>
#include <iostream>
#include <algorithm>
#include <math.h>
#include <set>
#include <string>
using namespace std;

typedef long long int ill;
typedef unsigned long long int ull;

#define forn(i,a,b) for(unsigned long long int i=(a);i<(b);++i)

int main(){
	ios::sync_with_stdio(false);
	cin.tie(NULL);

	ull T;
	cin >> T;

	string alpha = "abcdefghijklmnopqrstuvwxyz";
	forn(k,0,T){
		string s;
		cin >> s;
		ull letras[26];
		forn(i,0,26)
			letras[i] = 0;
		forn(i,0,s.size()){
			letras[s[i]-'a']++;
		}
		ull cant = 0;
		forn(i,0,26){
			if(letras[i])
				cant++;
		}
		bool resp = true;

		if(cant<=3){
			forn(i,0,26){
				if(letras[i]){
					if(letras[i+1] && letras[i+2]){
						cout<<"No answer"<<"\n";
						resp = false;
					}
					if(letras[i+1] && cant==2){
						cout<<"No answer"<<"\n";
						resp = false;
					}
					if(cant==1){
						cout<<alpha[i]<<"\n";
						resp = false;
					}
					break;
				}
			}
		}
		if(resp){
			string r;
			int inicio;
			forn(i,0,26){
				if(letras[i]){
					inicio = i;
					break;
				}
			}
			for(int i = inicio+1;i < 26;i+=2){
				forn(j,0,letras[i]){
					r+=alpha[i];
				}
			}
			for(int i = inicio;i < 26;i+=2){
				forn(j,0,letras[i]){
					r+=alpha[i];
				}
			}
		cout<<r<<"\n";
		}
	}
}


#include <vector>
#include <iostream>
#include <algorithm>
#include <math.h>
#include <set>
#include <string>
using namespace std;

typedef long long int ill;
typedef unsigned long long int ull;

#define forn(i,a,b) for(unsigned long long int i=(a);i<(b);++i)

int main(){
	ios::sync_with_stdio(false);
	cin.tie(NULL);

	ull T;
	cin >> T;

	string alpha = "abcdefghijklmnopqrstuvwxyz";
	forn(k,0,T){
		string s;
		cin >> s;
		ull letras[26];
		forn(i,0,26)
			letras[i] = 0;
		forn(i,0,s.size()){
			letras[s[i]-'a']++;
		}
		ull cant = 0;
		forn(i,0,26){
			if(letras[i])
				cant++;
		}
		bool resp = true;
		if(cant<=3){
			forn(i,0,26){
				if(letras[i]){
					if(letras[i+1] && letras[i+2]){
						cout<<"No answer";
						resp = false;
					}
					break;
				}
			}
		}
		if(resp){
			string r ="";
			for(int i = 0;i<26;i+=2){
				forn(j,0,letras[i]){
					r+=alpha[i];
				}
				letras[i] = 0;
			}
			bool quedaAlguna = true;
			while(quedaAlguna){
				//cout<<r<<endl;
				quedaAlguna = false;
				forn(i,0,26){
					if(letras[i]){
						quedaAlguna = true;
						for(int j = r.size();j>=0;j--){
							int l = 2;
							int d = 2;
							if (j>0){
								l = r[j-1]-alpha[i];
							}
							if (j<r.size()){
								d = r[j]-alpha[i];
							}
							if((l>1 || l<-1) && (d>1 || d<-1)){
								string nuevaR = "";
								forn(w,0,r.size()+letras[i]){
									if(w<j){
										nuevaR+=r[w];
									}
									if(w>=j && w<letras[i]+j){
										nuevaR+=alpha[i];
									}
									if(w>=letras[i]+j){
										nuevaR+=r[w-letras[i]];
									}
								}
								letras[i] = 0;
								r = nuevaR;
							}
						}
					}
				}
			}
		cout<<r<<"\n";
		}
	}
}


#include <vector>
#include <iostream>
#include <algorithm>
#include <math.h>
#include <set>
#include <string>
using namespace std;

typedef long long int ill;
typedef unsigned long long int ull;

#define forn(i,a,b) for(unsigned long long int i=(a);i<(b);++i)

int main(){
	ios::sync_with_stdio(false);
	cin.tie(NULL);

	ull T;
	cin >> T;

	string alpha = "abcdefghijklmnopqrstuvwxyz";
	forn(k,0,T){
		string s;
		cin >> s;
		ull letras[26];
		forn(i,0,26)
			letras[i] = 0;
		forn(i,0,s.size()){
			letras[s[i]-'a']++;
		}
		ull cant = 0;
		forn(i,0,26){
			if(letras[i])
				cant++;
		}
		bool resp = true;

		if(cant<=3){
			forn(i,0,26){
				if(letras[i]){
					if(i<=23 && letras[i+1] && letras[i+2]){
						cout<<"No answer"<<"\n";
						resp = false;
					}
					if(i<=24 && letras[i+1] && cant==2){
						cout<<"No answer"<<"\n";
						resp = false;
					}
					if(cant==1){
						forn(j,0,letras[i])
							cout<<alpha[i];
						cout<<"\n";
						resp = false;
					}
					break;
				}
			}
		}
		if(resp){
			string r;
			int inicio;
			forn(i,0,26){
				if(letras[i]){
					inicio = i;
					break;
				}
			}
			forn(i,0,letras[inicio]){
				r+=alpha[inicio];
			}
			bool adelante = true;
			forn(i,inicio+2,26){
				if(letras[i]){
					if(adelante){
						adelante = false;
						forn(j,0,letras[i]){
							r+=alpha[i];
						}
					} else {
						adelante = true;
						string nuevaR;
						forn(j,0,letras[i]){
							nuevaR+=alpha[i];
						}
						r = nuevaR+r;
					}
				}
			}
			if(inicio!= 25 && letras[inicio+1]){
				forn(i,0,r.size()+1){
					int l = 2;
					int d = 2;
					if (i>0){
						l = r[i-1]-alpha[inicio+1];
					}
					if (i<r.size()){
						d = r[i]-alpha[inicio+1];
					}
					if((l>1 || l<-1) && (d>1 || d<-1)){
						string nuevaR;
						forn(j,0,i){
							nuevaR+=r[j];
						}
						forn(j,0,letras[inicio+1]){
							nuevaR+=alpha[inicio+1];
						}
						forn(j,i,r.size()){
							nuevaR+=r[j];
						}
						r = nuevaR;
						break;
					}
				}
			}
		cout<<r<<"\n";
		}
	}
}


#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<(b);++i)
using namespace std;
string x;
int y[30];
vector<int> z;
void p(int a,int b){
	rep(i,0,b)putchar(a+'a'-1);
}
int main(){
//	ios::sync_with_stdio(false);
//	cin.tie(0);
	int n;
	cin>>n;
	while(n--){
		cin>>x;
		z.clear();
		memset(y,0,sizeof(y));
		for(auto i:x){
			++y[i-'a'+1];
		}
		for(int i=1;i<=26;++i){
			if(y[i])
				z.push_back(i);
		}
		if((z.size()==2&&z[1]-z[0]==1)||(z.size()==3&&z[1]-z[0]==1&&z[2]-z[1]==1)){
			cout<<"No answer\n";
			continue;
		}
		if(z.size()==3&&z[2]-z[1]==1){
			p(z[2],y[z[2]]);
			p(z[0],y[z[0]]);
			p(z[1],y[z[1]]);
			cout<<endl;
		}
		else{
			int len=z.size();
			for(int i=len-1;i>=0;i-=2)p(z[i],y[z[i]]);
			for(int i=len-2;i>=0;i-=2)p(z[i],y[z[i]]);
			cout<<endl;
		}
	}
	return 0;
}


#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<(b);++i)
using namespace std;
string x;
int y[30];
vector<int> z;
void p(int a,int b){
	rep(i,0,b)putchar(a+'a'-1);
}
int main(){
//	ios::sync_with_stdio(false);
//	cin.tie(0);
	int n;
	cin>>n;
	while(n--){
		cin>>x;
		z.clear();
		memset(y,0,sizeof(y));
		for(auto i:x){
			++y[i-'a'+1];
		}
		for(int i=1;i<=26;++i){
			if(y[i])
				z.push_back(i);
		}
		if((z.size()==2&&z[1]-z[0]==1)||(z.size()==3&&z[1]-z[0]==1&&z[2]-z[1]==1)){
			cout<<"No answer\n";
			continue;
		}
		if(z.size()==3&&z[2]-z[1]==1){
			p(z[2],y[z[2]]);
			p(z[0],y[z[0]]);
			p(z[1],y[z[1]]);
			cout<<endl;
		}
		else{
			int len=z.size();
			if(len&1){
				for(int i=len-1;i>=0;i-=2)p(z[i],y[z[i]]);
				for(int i=len-2;i>=0;i-=2)p(z[i],y[z[i]]);
			}
			else{
				for(int i=len-2;i>=0;i-=2)p(z[i],y[z[i]]);
				for(int i=len-1;i>=0;i-=2)p(z[i],y[z[i]]);
			}
			cout<<endl;
		}
	}
	return 0;
}


#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<(b);++i)
using namespace std;
string x;
int y[30];
vector<int> z;
void p(int a,int b){
	rep(i,0,b)putchar(a+'a'-1);
}
int main(){
//	ios::sync_with_stdio(false);
//	cin.tie(0);
	int n;
	cin>>n;
	while(n--){
		cin>>x;
		z.clear();
		memset(y,0,sizeof(y));
		for(auto i:x){
			++y[i-'a'+1];
		}
		for(int i=1;i<=26;++i){
			if(y[i])
				z.push_back(i);
		}
		if((z.size()==2&&z[1]-z[0]==1)||(z.size()==3&&z[1]-z[0]==1&&z[2]-z[1]==1)){
			cout<<"No answer\n";
			continue;
		}
		if(z.size()==3&&z[2]-z[1]==1){
			p(z[2],y[z[2]]);
			p(z[0],y[z[0]]);
			p(z[1],y[z[1]]);
			cout<<endl;
		}
		else{
			int len=z.size();
			for(int i=0;i<len;i+=2)p(z[i],y[z[i]]);
			for(int i=1;i<len;i+=2)p(z[i],y[z[i]]);
			cout<<endl;
		}
	}
	return 0;
}


#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<(b);++i)
using namespace std;
string x;
int y[30];
vector<int> z;
int main(){
//	ios::sync_with_stdio(false);
//	cin.tie(0);
	int n;
	cin>>n;
	while(n--){
		cin>>x;
		z.clear();
		memset(y,0,sizeof(y));
		for(auto i:x){
			++y[i-'a'+1];
		}
		for(int i=1;i<=26;++i){
			if(y[i])
				z.push_back(i);
		}
		if((z.size()==2&&z[1]-z[0]==1)||(z.size()==3&&z[1]-z[0]==1&&z[2]-z[1]==1)){
			cout<<"No answer\n";
			continue;
		}
		int len=z.size();
		for(int i=0;i<len;i+=2)
			rep(j,0,y[z[i]])putchar(z[i]+'a'-1);
		for(int i=1;i<len;i+=2)
			rep(j,0,y[z[i]])putchar(z[i]+'a'-1);
		putchar('\n');
	}
	return 0;
}


/******************************************************/
/******************************************************/
/**            BISMILLAHIR RAHMANIR RAHIM            **/
/**         Al-Shahriar Tonmoy - Red_Sparkle         **/
/**  Department of Computer Science and Engineering  **/
/**               Barisal University                 **/
/**               It's time to bloom.                **/
/******************************************************/
/******************************************************/

#include<bits/stdc++.h>
using namespace std;
#define     fRead           freopen("input.txt","r",stdin)
#define     fWrite          freopen("output.txt","w",stdout)
#define     fast            ios_base::sync_with_stdio(false);cin.tie(NULL)
#define     in1(X)          scanf("%lli",&(X))
#define     in2(X,Y)        scanf("%lli%lli",&(X),&(Y))
#define     in3(X,Y,Z)      scanf("%lli%lli%lli",&(X),&(Y),&(Z))
#define     ins(S)          scanf("%s",(S))
#define     out(X)          printf("%lli",(X))
#define     outs(S)         printf("%s",(S))
#define     printnl         printf("\n")
#define     printsp         printf(" ");
#define     End             return 0
#define     ll              long long int
#define     ul              unsigned long long int
#define     dob             double
#define     st              string
#define     pairl           pair<ll,ll>
#define     max3(a,b,c)     max(a,max(b,c))
#define     min3(a,b,c)     min(a,min(b,c))
#define     fr              first
#define     se              second
#define     T               true
#define     F               false
#define     nl              "\n"
#define     all(v)          v.begin(),v.end()
#define     mem(a,v)        memset(a,v,sizeof(a))
#define     maxi            1000000000000000014
#define     mini            -100000000000014
#define     mod             998244353
#define     an              300007
#define     mapi            map<ll,ll>
#define     pi              push_back
#define     po              pop_back
#define     ve              vector<ll>
#define     mp              make_pair
#define     PI              3.14159265

/*************** #Template FUNCTIONS# **************/

/// ll pc;void PrintCase(){printf("Case %lli: ",++pc);}
/// ll GCD(ll a,ll b){if(a<0) a*=-1;if(b<0) b*=-1;if(a<b)swap(a,b);if(b==1) return 1;if(!b) return a;if(!(a%b)) return b;else return GCD(b,a%b);}
/// ll LCM(ll a,ll b){return (a*b)/GCD(a,b);}
/// ll bigmod(ll n,ll p){if(p==0) return 1;if(p==1)return (n+mod)%mod;if(p%2)return (bigmod(n,p-1)*n+mod)%mod;else{ll x=bigmod(n,p/2);return (x*x+mod)%mod;}}
/// ll modinverse(ll n){return bigmod(n,mod-2)%mod;}
/// bool sc[an];ve pr;void sieve(){for(ll i=2;i*i<an;i++){if(!sc[i]){for(ll j=i*i;j<an;j+=i) sc[j]=1;}}pr.pi(2);for(ll i=3;i<an;i+=2) if(!sc[i]) pr.pi(i);}
/// pairl pf[an];void pri_fact(ll n){ll i,u=0;for(i=0;i<pr.size() && n!=1;i++){ll c=0;while(!(n%pr[i])){n/=pr[i];c++;} if(c){pf[u].fr=pr[i];pf[u].se=c;u++;}}if(n>1){pf[u].fr=n;pf[u].se=1;}}
/// ve de;void devisors(ll n){ll i;for(i=1;i<=sqrt(n);i++){if(!(n%i) && i!=sqrt(n)){de.pi(i);de.pi(n%i);}}if((i-1)*(i-1)==n) de.pi(i-1);sort(all(de));}

/********************** START **********************/

int main()
{

    fast;

    ll t;
    cin>>t;
    while(t--){
        st s,ans;
        cin>>s;
        ll n=s.size(),i,j;
        sort(all(s));
        for(i=0,j=n/2;i<n/2;i++,j++){
            ans+=s[j];
            if(i<n/2) ans+=s[i];
        }
        if(n%2) ans+=s[j];
        for(i=1;i<n;i++){
            if(abs(ans[i-1]-ans[i])==1){
                //cout<<"No answer"<<endl;
                break;
            }
        }
        if(i==n) cout<<ans<<endl;
        else{
            ans.clear();
            if(n%2) j=n/2+1;
            else j=n/2;
            for(i=0;i<n/2;i++,j++){
                ans+=s[i];
                if(j<n) ans+=s[j];
            }
            if(n%2) ans+=s[i];
            for(i=1;i<n;i++){
                if(abs(ans[i-1]-ans[i])==1){
                    cout<<"No answer"<<endl;
                    break;
                }
            }
            if(i==n) cout<<ans<<endl;
        }
    }

    End;
}
/*****************  ALHAMDULILLAH  *****************/


/******************************************************/
/******************************************************/
/**            BISMILLAHIR RAHMANIR RAHIM            **/
/**         Al-Shahriar Tonmoy - Red_Sparkle         **/
/**  Department of Computer Science and Engineering  **/
/**               Barisal University                 **/
/**               It's time to bloom.                **/
/******************************************************/
/******************************************************/

#include<bits/stdc++.h>
using namespace std;
#define     fRead           freopen("input.txt","r",stdin)
#define     fWrite          freopen("output.txt","w",stdout)
#define     fast            ios_base::sync_with_stdio(false);cin.tie(NULL)
#define     in1(X)          scanf("%lli",&(X))
#define     in2(X,Y)        scanf("%lli%lli",&(X),&(Y))
#define     in3(X,Y,Z)      scanf("%lli%lli%lli",&(X),&(Y),&(Z))
#define     ins(S)          scanf("%s",(S))
#define     out(X)          printf("%lli",(X))
#define     outs(S)         printf("%s",(S))
#define     printnl         printf("\n")
#define     printsp         printf(" ");
#define     End             return 0
#define     ll              long long int
#define     ul              unsigned long long int
#define     dob             double
#define     st              string
#define     pairl           pair<ll,ll>
#define     max3(a,b,c)     max(a,max(b,c))
#define     min3(a,b,c)     min(a,min(b,c))
#define     fr              first
#define     se              second
#define     T               true
#define     F               false
#define     nl              "\n"
#define     all(v)          v.begin(),v.end()
#define     mem(a,v)        memset(a,v,sizeof(a))
#define     maxi            1000000000000000014
#define     mini            -100000000000014
#define     mod             998244353
#define     an              300007
#define     mapi            map<ll,ll>
#define     pi              push_back
#define     po              pop_back
#define     ve              vector<ll>
#define     mp              make_pair
#define     PI              3.14159265

/*************** #Template FUNCTIONS# **************/

/// ll pc;void PrintCase(){printf("Case %lli: ",++pc);}
/// ll GCD(ll a,ll b){if(a<0) a*=-1;if(b<0) b*=-1;if(a<b)swap(a,b);if(b==1) return 1;if(!b) return a;if(!(a%b)) return b;else return GCD(b,a%b);}
/// ll LCM(ll a,ll b){return (a*b)/GCD(a,b);}
/// ll bigmod(ll n,ll p){if(p==0) return 1;if(p==1)return (n+mod)%mod;if(p%2)return (bigmod(n,p-1)*n+mod)%mod;else{ll x=bigmod(n,p/2);return (x*x+mod)%mod;}}
/// ll modinverse(ll n){return bigmod(n,mod-2)%mod;}
/// bool sc[an];ve pr;void sieve(){for(ll i=2;i*i<an;i++){if(!sc[i]){for(ll j=i*i;j<an;j+=i) sc[j]=1;}}pr.pi(2);for(ll i=3;i<an;i+=2) if(!sc[i]) pr.pi(i);}
/// pairl pf[an];void pri_fact(ll n){ll i,u=0;for(i=0;i<pr.size() && n!=1;i++){ll c=0;while(!(n%pr[i])){n/=pr[i];c++;} if(c){pf[u].fr=pr[i];pf[u].se=c;u++;}}if(n>1){pf[u].fr=n;pf[u].se=1;}}
/// ve de;void devisors(ll n){ll i;for(i=1;i<=sqrt(n);i++){if(!(n%i) && i!=sqrt(n)){de.pi(i);de.pi(n%i);}}if((i-1)*(i-1)==n) de.pi(i-1);sort(all(de));}

/********************** START **********************/

int main()
{

    fast;

    ll t;
    cin>>t;
    while(t--){
        st s,ans;
        cin>>s;
        ll n=s.size(),i,j;
        sort(all(s));
        for(i=0,j=n/2;i<n/2;i++,j++){
            ans+=s[j];
            if(i<n/2) ans+=s[i];
        }
        if(n%2) ans+=s[j];
        for(i=1;i<n;i++){
            if(abs(ans[i-1]-ans[i])==1){
                cout<<"No answer"<<endl;
                break;
            }
        }
        if(i==n) cout<<ans<<endl;
    }

    End;
}
/*****************  ALHAMDULILLAH  *****************/


/******************************************************/
/******************************************************/
/**            BISMILLAHIR RAHMANIR RAHIM            **/
/**         Al-Shahriar Tonmoy - Red_Sparkle         **/
/**  Department of Computer Science and Engineering  **/
/**               Barisal University                 **/
/**               It's time to bloom.                **/
/******************************************************/
/******************************************************/

#include<bits/stdc++.h>
using namespace std;
#define     fRead           freopen("input.txt","r",stdin)
#define     fWrite          freopen("output.txt","w",stdout)
#define     fast            ios_base::sync_with_stdio(false);cin.tie(NULL)
#define     in1(X)          scanf("%lli",&(X))
#define     in2(X,Y)        scanf("%lli%lli",&(X),&(Y))
#define     in3(X,Y,Z)      scanf("%lli%lli%lli",&(X),&(Y),&(Z))
#define     ins(S)          scanf("%s",(S))
#define     out(X)          printf("%lli",(X))
#define     outs(S)         printf("%s",(S))
#define     printnl         printf("\n")
#define     printsp         printf(" ");
#define     End             return 0
#define     ll              long long int
#define     ul              unsigned long long int
#define     dob             double
#define     st              string
#define     pairl           pair<ll,ll>
#define     max3(a,b,c)     max(a,max(b,c))
#define     min3(a,b,c)     min(a,min(b,c))
#define     fr              first
#define     se              second
#define     T               true
#define     F               false
#define     nl              "\n"
#define     all(v)          v.begin(),v.end()
#define     mem(a,v)        memset(a,v,sizeof(a))
#define     maxi            1000000000000000014
#define     mini            -100000000000014
#define     mod             998244353
#define     an              300007
#define     mapi            map<ll,ll>
#define     pi              push_back
#define     po              pop_back
#define     ve              vector<ll>
#define     mp              make_pair
#define     PI              3.14159265

/*************** #Template FUNCTIONS# **************/

/// ll pc;void PrintCase(){printf("Case %lli: ",++pc);}
/// ll GCD(ll a,ll b){if(a<0) a*=-1;if(b<0) b*=-1;if(a<b)swap(a,b);if(b==1) return 1;if(!b) return a;if(!(a%b)) return b;else return GCD(b,a%b);}
/// ll LCM(ll a,ll b){return (a*b)/GCD(a,b);}
/// ll bigmod(ll n,ll p){if(p==0) return 1;if(p==1)return (n+mod)%mod;if(p%2)return (bigmod(n,p-1)*n+mod)%mod;else{ll x=bigmod(n,p/2);return (x*x+mod)%mod;}}
/// ll modinverse(ll n){return bigmod(n,mod-2)%mod;}
/// bool sc[an];ve pr;void sieve(){for(ll i=2;i*i<an;i++){if(!sc[i]){for(ll j=i*i;j<an;j+=i) sc[j]=1;}}pr.pi(2);for(ll i=3;i<an;i+=2) if(!sc[i]) pr.pi(i);}
/// pairl pf[an];void pri_fact(ll n){ll i,u=0;for(i=0;i<pr.size() && n!=1;i++){ll c=0;while(!(n%pr[i])){n/=pr[i];c++;} if(c){pf[u].fr=pr[i];pf[u].se=c;u++;}}if(n>1){pf[u].fr=n;pf[u].se=1;}}
/// ve de;void devisors(ll n){ll i;for(i=1;i<=sqrt(n);i++){if(!(n%i) && i!=sqrt(n)){de.pi(i);de.pi(n%i);}}if((i-1)*(i-1)==n) de.pi(i-1);sort(all(de));}

/********************** START **********************/

int main()
{

    fast;

    ll t;
    cin>>t;
    while(t--){
        st s,ans;
        cin>>s;
        ll n=s.size(),i,j;
        sort(all(s));
        for(i=0,j=n/2;i<=n/2;i++,j++){
            ans+=s[j];
            if(i<n/2) ans+=s[i];
        }
        for(i=1;i<n;i++){
            if(abs(ans[i-1]-ans[i])==1){
                cout<<"No answer"<<endl;
                break;
            }
        }
        if(i==n) cout<<ans<<endl;
    }

    End;
}
/*****************  ALHAMDULILLAH  *****************/


#include <bits/stdc++.h>

#define forn(i, n) for (int i = 0; i < int(n); i++)

using namespace std;

bool check(string s){
	bool ok = true;
	forn(i, int(s.size()) - 1)
		ok &= (abs(s[i] - s[i + 1]) != 1);
	return ok;
}

int main() {
	int T;
	scanf("%d", &T);
	static char buf[120];
	forn(_, T){
		scanf("%s", buf);
		string s = buf;
		string odd = "", even = "";
		forn(i, s.size()){
			if (s[i] % 2 == 0)
				odd += s[i];
			else
				even += s[i];
		}
		sort(odd.begin(), odd.end());
		sort(even.begin(), even.end());
		if (check(odd + even))
			printf("%s\n", (odd + even).c_str());
		else if (check(even + odd))
			printf("%s\n", (even + odd).c_str());
		else
			puts("No answer");
	}
	return 0;
}


/******************************************************/
/******************************************************/
/**            BISMILLAHIR RAHMANIR RAHIM            **/
/**         Al-Shahriar Tonmoy - Red_Sparkle         **/
/**  Department of Computer Science and Engineering  **/
/**               Barisal University                 **/
/**               It's time to bloom.                **/
/******************************************************/
/******************************************************/

#include<bits/stdc++.h>
using namespace std;
#define     fRead           freopen("input.txt","r",stdin)
#define     fWrite          freopen("output.txt","w",stdout)
#define     fast            ios_base::sync_with_stdio(false);cin.tie(NULL)
#define     in1(X)          scanf("%lli",&(X))
#define     in2(X,Y)        scanf("%lli%lli",&(X),&(Y))
#define     in3(X,Y,Z)      scanf("%lli%lli%lli",&(X),&(Y),&(Z))
#define     ins(S)          scanf("%s",(S))
#define     out(X)          printf("%lli",(X))
#define     outs(S)         printf("%s",(S))
#define     printnl         printf("\n")
#define     printsp         printf(" ");
#define     End             return 0
#define     ll              long long int
#define     ul              unsigned long long int
#define     dob             double
#define     st              string
#define     pairl           pair<ll,ll>
#define     max3(a,b,c)     max(a,max(b,c))
#define     min3(a,b,c)     min(a,min(b,c))
#define     fr              first
#define     se              second
#define     T               true
#define     F               false
#define     nl              "\n"
#define     all(v)          v.begin(),v.end()
#define     mem(a,v)        memset(a,v,sizeof(a))
#define     maxi            1000000000000000014
#define     mini            -100000000000014
#define     mod             998244353
#define     an              300007
#define     mapi            map<ll,ll>
#define     pi              push_back
#define     po              pop_back
#define     ve              vector<ll>
#define     mp              make_pair
#define     PI              3.14159265

/*************** #Template FUNCTIONS# **************/

/// ll pc;void PrintCase(){printf("Case %lli: ",++pc);}
/// ll GCD(ll a,ll b){if(a<0) a*=-1;if(b<0) b*=-1;if(a<b)swap(a,b);if(b==1) return 1;if(!b) return a;if(!(a%b)) return b;else return GCD(b,a%b);}
/// ll LCM(ll a,ll b){return (a*b)/GCD(a,b);}
/// ll bigmod(ll n,ll p){if(p==0) return 1;if(p==1)return (n+mod)%mod;if(p%2)return (bigmod(n,p-1)*n+mod)%mod;else{ll x=bigmod(n,p/2);return (x*x+mod)%mod;}}
/// ll modinverse(ll n){return bigmod(n,mod-2)%mod;}
/// bool sc[an];ve pr;void sieve(){for(ll i=2;i*i<an;i++){if(!sc[i]){for(ll j=i*i;j<an;j+=i) sc[j]=1;}}pr.pi(2);for(ll i=3;i<an;i+=2) if(!sc[i]) pr.pi(i);}
/// pairl pf[an];void pri_fact(ll n){ll i,u=0;for(i=0;i<pr.size() && n!=1;i++){ll c=0;while(!(n%pr[i])){n/=pr[i];c++;} if(c){pf[u].fr=pr[i];pf[u].se=c;u++;}}if(n>1){pf[u].fr=n;pf[u].se=1;}}
/// ve de;void devisors(ll n){ll i;for(i=1;i<=sqrt(n);i++){if(!(n%i) && i!=sqrt(n)){de.pi(i);de.pi(n%i);}}if((i-1)*(i-1)==n) de.pi(i-1);sort(all(de));}

/********************** START **********************/

int main()
{

    fast;

    ll t;
    cin>>t;
    while(t--){
        st s,ans;
        cin>>s;
        ll n=s.size(),i,j;
        sort(all(s));
        for(i=0,j=n/2;i<n/2;i++,j++){
            ans+=s[j];
            if(i<n/2) ans+=s[i];
        }
        if(n%2) ans+=s[j];
        for(i=1;i<n;i++){
            if(abs(ans[i-1]-ans[i])==1){
                //cout<<"No answer"<<endl;
                break;
            }
        }
        if(i==n) cout<<ans<<endl;
        else{
            ans.clear();
            for(i=0,j=n/2;i<n/2;i++,j++){
                ans+=s[i];
                if(i<n/2) ans+=s[j];
            }
            if(n%2) ans+=s[i];
            for(i=1;i<n;i++){
                if(abs(ans[i-1]-ans[i])==1){
                    cout<<"No answer"<<endl;
                    break;
                }
            }
            if(i==n) cout<<ans<<endl;
        }
    }

    End;
}
/*****************  ALHAMDULILLAH  *****************/


#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int cnt[30], ans[30];
bool vis[30], bvis[30];

bool dfsgo(int x, int d, int n)
{
    int i;
    if(d == n)
        return 1;
    for(i = x - 2; i >= 0; i--)
        if(!bvis[i] && vis[i])
        {
            bvis[i] = 1;
            ans[d] = i;
            if(dfsgo(i, d + 1, n))
                return 1;
            bvis[i] = 0;
        }
    for(i = x + 2; i < 26; i++)
        if(!bvis[i] && vis[i])
        {
            bvis[i] = 1;
            ans[d] = i;
            if(dfsgo(i, d + 1, n))
                return 1;
            bvis[i] = 0;
        }
    return 0;
}
int main()
{
    //freopen("1.txt", "r", stdin);
    //freopen("2.txt", "w", stdout);
    string s;
    int i, l, typeN, T;
    cin >> T;
    while(T--)
    {
        cin >> s;
        typeN = 0;
        memset(cnt, 0, sizeof(cnt));
        memset(vis, 0, sizeof(vis));
        memset(bvis, 0, sizeof(bvis));
        l = s.length();
        for(i = 0; i < l; i++)
        {
            ++cnt[ s[i] - 'a' ];
            if(!vis[s[i] - 'a'])
            {
                ++typeN;
                vis[ s[i] - 'a' ] = 1;
            }
        }
        for(i = 0; i < 26; i++)
            if(vis[i])
            {
                ans[0] = i;
                bvis[i] = 1;
                if(dfsgo(i, 1, typeN))
                    break;
                bvis[i] = 0;
            }
        if(i == 26)
        {
            puts("No answer");
            continue;
        }
        for(i = 0; i < typeN; i++)
            while(cnt[ans[i]]--)
                putchar(ans[i] + 'a');
        puts("");
    }
}


#include<stdio.h>
#include<string.h>
char a[105];
int b[27];
char c[55];
char d[55];
int check()
{
	int l=strlen(a);
	for(int i=0;i<l-1;i++)
	{
		if(a[i]==a[i+1]+1||a[i]==a[i+1]-1)
		return 0;
	}
	return 1;
}
int main()
{
	int t;
	scanf("%d",&t);
	while(t--)
	{
		scanf("%s",a);
		int l=strlen(a);
		memset(b,0,sizeof(b));
		for(int i=0;i<l;i++)
		b[a[i]-96]++;
		memset(c,0,sizeof(c));
		memset(d,0,sizeof(d));
		int e=0,f=0;
		for(int i=1;i<27;i++)
		{
			if(i%2==0)
			{
				while(b[i]--)
				{
					c[e]=i+96;
					e++;
				}
			}
			else
			{
				while(b[i]--)
				{
					d[f]=i+96;
					f++;
				}
			}
		}
		c[e]='\0';
		d[f]='\0';
		memset(a,0,sizeof(a));
		strcat(a,c);
		strcat(a,d);
		if(check())
		printf("%s\n",a);
		else
		{
			memset(a,0,sizeof(a));
			strcat(a,d);
			strcat(a,c);
			if(check())
			printf("%s\n",a);
			else
			printf("No answer\n");
		}

	}
	return 0;
 }


#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <algorithm>
using namespace std;
int T;

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	cin>>T;
	string s,s1,s2,ans;
	while(T--)
	{
		cin>>s;
		s1="";s2="";
		sort(s.begin(),s.end());
		for(int i=0;i<s.size();i++) if(s[i]%2==0) s1=s1+s[i];
		for(int i=0;i<s.size();i++) if(s[i]%2==1) s2=s2+s[i];
		ans=s1+s2;
		int flag=0;
		for(int i=1;i<ans.size();i++)
			if(abs(ans[i]-ans[i-1])==1)
			{
				flag=1;
				break;
			}
		if(flag==0)
		{
			cout<<ans<<endl;
			continue;
		}
		ans=s2+s1;
		flag=0;
		for(int i=1;i<ans.size();i++)
			if(abs(ans[i]-ans[i-1])==1)
			{
				flag=1;
				break;
			}
		if(flag==0)
		{
			cout<<ans<<endl;
			continue;
		}
		else cout<<"No answer"<<endl;
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main() {
    int T;
    string a,b;//a奇数位,b偶数位
    cin>>T;
    while(T--) {
        a.clear();
        b.clear();
        char ch;
        while (cin >> ch) {
            if (ch % 2)
                b += ch;
            else
                a += ch;
        }
        sort(a.begin(), a.end());
        sort(b.begin(), b.end());
        if (fabs(a[a.length() - 1] - b[0]) > 1) {
            cout << a + b << endl;
        } else if (fabs(b[b.length() - 1] - a[0]) > 1) {
            cout << b + a << endl;
        } else {
            cout << "No answer"<<endl;
        }
    }
    return 0;
}


#include <bits/stdc++.h>
#define fi first
#define se second

typedef long long ll;
typedef std::pair < int, int > pr;

using std::cin;
using std::cout;

inline void up(int &x, int y) { x < y ? x = y : 0; }
inline void down(int &x, int y) { x > y ? x = y : 0; }
inline int abs(int x) { return x > 0 ? x : -x; }

int T, n;
std::string str, s[2];
inline bool check(std::string str) {
    for (int i = 0; i < n - 1; ++i)
        if (abs((int) str[i] - str[i + 1]) == 1) return false;
    return true;
}
inline void work() {
    s[0] = "", s[1] = "";
    cin >> str, n = str.size();
    for (int i = 0; i < n; ++i) s[str[i] & 1] += str[i];
    std::sort(s[0].begin(), s[0].end());
    std::sort(s[1].begin(), s[1].end());
    if (check(s[0] + s[1])) cout << s[0] + s[1] << '\n';
    else if (check(s[1] + s[0])) cout << s[1] + s[0] << '\n';
    else cout << "No answer" << '\n';
}
int main() {
    std::ios::sync_with_stdio(false), std::cin.tie(0);
    for (cin >> T; T; --T) work();
    return 0;
}


#include <iostream>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <queue>
#include <math.h>
using namespace std;
int T;
string s;
deque<char> dq;

int main()
{
	ios::sync_with_stdio(false);
	cin>>T;
	while(T--)
	{
		cin>>s;
		while(!dq.empty()) dq.pop_front();
		dq.push_front(s[0]);
		s.erase(0,1);
		int flag=0;
		while(!s.empty())
		{
			int i;
			for(i=0;i<s.size();i++)
				if(abs(dq.front()-s[i])!=1&&abs(dq.front()-s[i])!=25)
					break;
			if(i!=s.size())
			{
				dq.push_front(s[i]);
				s.erase(i,1);
				continue;
			}
			for(i=0;i<s.size();i++)
				if(abs(dq.back()-s[i])!=1&&abs(dq.back()-s[i])!=25)
					break;
			if(i!=s.size())
			{
				dq.push_back(s[i]);
				s.erase(i,1);
				continue;
			}
			printf("No answer\n");
			flag=1;
			break;
		}
		if(flag==1) continue;
		while(!dq.empty()) printf("%c",dq.front()),dq.pop_front();
		printf("\n");
	}
	return 0;
}


#include <cstdio>
#include <cstring>
#include <algorithm>
#include <string.h>
#include <stdlib.h>
using namespace std;
#define N 205
char s[N];  int n;  int  a[N];  int cnt[30];
int bookA[N]; int bookA_size;
int bookB[N]; int bookB_size;
int bookC[N]; int bookC_size;
int  cas;

bool check(){
    for(int i=2;i<=bookC_size;++i){
        if(abs(bookC[i]-bookC[i-1])==1||abs(bookC[i]-bookC[i-1])==25) return false;
    }
    return true;
}
int main(){
    scanf("%d",&cas);
    while(cas--){
        scanf("%s",s+1);
        n=(int)strlen(s+1);
        memset(cnt, 0, sizeof(cnt));
        for(int i=1;i<=n;++i) ++cnt[s[i]-'a'];

        bookA_size=0;   bookB_size=0;
        for(int i=0;i<26;++i)
            if(cnt[i]){
                if(i&1)   bookA[++bookA_size]=i;
                else      bookB[++bookB_size]=i;
            }

        bookC_size=0;
        for(int i=1;i<=bookA_size;++i) bookC[++bookC_size]=bookA[i];
        for(int i=1;i<=bookB_size;++i) bookC[++bookC_size]=bookB[i];
        if( check() ){
            for(int i=1;i<=bookC_size;++i){
                for(int j=1;j<=cnt[bookC[i]];++j)
                    printf("%c",bookC[i]+'a');
            }
            printf("\n");
            continue;
        }

        bookC_size=0;
        for(int i=1;i<=bookB_size;++i) bookC[++bookC_size]=bookB[i];
        for(int i=1;i<=bookA_size;++i) bookC[++bookC_size]=bookA[i];
        if( check() ){
            for(int i=1;i<=bookC_size;++i){
                for(int j=1;j<=cnt[bookC[i]];++j)
                    printf("%c",bookC[i]+'a');
            }
            printf("\n");
            continue;
        }
        printf("No answer\n");
    }
    return 0;
}


#include<iostream>
#include<cstring>
#include<cstdio>
using namespace std;
const int MAXN=110;
struct edge{
	int to;
	int next;
}e[MAXN*MAXN*2];
char data[MAXN];
int T,len,tot,cnt,head[MAXN],vis[MAXN],ans[MAXN];
void add_edge(int u,int v)
{
	e[++tot].next=head[u];
	e[tot].to=v;
	head[u]=tot;
}
void dfs(int x)
{
	for(int i=head[x];i;i=e[i].next)
	{
		int to=e[i].to;
		if(vis[to]) continue;
		vis[to]=1;ans[++cnt]=to;dfs(to);
		if(cnt==len) return ;
		vis[to]=0;cnt--;
	}
}
int main()
{
	cin>>T;
	while(T--)
	{
		tot=0;
		memset(head,0,sizeof head);
		scanf("%s",&data);
		len=strlen(data);
		for(int i=0;i<len;i++)
			for(int j=i+1;j<len;j++)
				if(data[i]-data[j]!=1&&data[i]-data[j]!=-1)
				{
					add_edge(i+1,j+1);
					add_edge(j+1,i+1);
				}
		int ac=0;
		for(int i=1;i<=len;i++)
		{
			memset(vis,0,sizeof vis);
			cnt=0;dfs(i);
			if(cnt==len)
			{
				for(int i=1;i<=len;i++)
					printf("%c",data[ans[i]-1]);
				printf("\n");ac=1;
			}
			if(ac) break;
		}
		if(!ac) printf("No answer\n");
	}
}


//≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈
//  Date : 2019.05.01 22:31:09 May Wednesday
//  Author : Sakii
//  No website temporarily
//  I'm so vegetable , QAQ..
//≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈

#include<bits/stdc++.h>
#define re register
#define il inline
#define lowbit(x) x&(-x)

using namespace std;

typedef long long ll;
typedef unsigned long long ull;

template <class T> inline void read(T &s){
    s = 0; re char ch = getchar(); re int w = 0;
    while(!isdigit(ch)) w |= ch == '-', ch = getchar();
    while(isdigit(ch)) s = (s << 1) + (s << 3) + (ch ^ 48), ch = getchar();
    if(w) s = -s;
}

int T,a[30];
char s[110],e[110],o[110];

int main() {
    read(T);
    while(T--) {
        scanf("%s",s+1);
        int len = strlen(s+1);
        int lene = 0, leno = 0;
        for(int i = 1; i <= len; i++) {
            if(s[i]&1) e[++lene] = s[i];
            else o[++leno] = s[i];
        }
        sort(e+1,e+lene+1);
        sort(o+1,o+leno+1);
        int f = abs(o[1] - e[lene]);
        int fl = abs(e[1] - o[leno]);
        if(f!=1) {
            for(int i = 1; i <= lene; i++) putchar(e[i]);
            for(int i = 1; i <= leno; i++) putchar(o[i]);
            printf("\n");
        }
        else if(fl!=1) {
            for(int i = 1; i <= leno; i++) putchar(o[i]);
            for(int i = 1; i <= lene; i++) putchar(e[i]);
            printf("\n");
    }
    else {printf("No answer\n");}
    }
    return 0;
}


#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<cmath>
using namespace std;

int main()
{
	int t;
	cin>>t;
	while(t--)
	{
		string s;
		vector<char> tmp1,tmp2;
		cin>>s;
		for(int i=0;i<s.size();i++)
		{
			if(s[i]%2) tmp2.push_back(s[i]);
			else tmp1.push_back(s[i]);
		}
		sort(tmp1.begin(),tmp1.end());
		sort(tmp2.begin(),tmp2.end());
		if(tmp1.empty()||tmp2.empty())
		{
			for(char x:tmp1) cout<<x;
			for(char x:tmp2) cout<<x;
		}
		else if(abs( *(tmp1.begin()) - *(--tmp2.end())) !=1)
		{
			for(char x:tmp2) cout<<x;
			for(char x:tmp1) cout<<x;
		}
		else if(abs( *(tmp2.begin()) - *(--tmp1.end())) !=1)
		{
			for(char x:tmp1) cout<<x;
			for(char x:tmp2) cout<<x;
		}
		else
		{
			cout<<"No answer";
		}
		cout<<endl;
	}
}


n = int(input())
for i in range(n):
    z = input()
    o = ''
    for j in range(len(z)):
        if z[j] != '0':
            o += int(z[j]) * 10**(len(z) - 1)
            o += ' '
    print(o[:-1])


t=int(input())
data=[];
for _ in range(t):
    ele=input()
    data.append(ele)
for num in data:
        print(len(num)-num.count("0"))
        count=len(num)
        for digit in num:
            if digit!="0":
                print(int(digit)*(10**(count-1)))
            count=count-1


num = int(input())
sum=0
i=0
j=0
for i in range[5]:
    list[i] = (num%(10**(i+1)))//(10**i)
    if list[i] != 0: sum += 1
    i += 1
print(sum)
for j in list:
    if list != 0: print(list[j]*(10**j))


num = int(input())
sum=0
i=0
j=0
for i in range[5]:
    list[i] = (num%(10**(i+1)))//(10**i)
    if list[i] != 0: sum += 1
    i += 1
print(sum)
for j in list:
    if list[j] != 0: print(list[j]*(10**j))


for mda in range(int(input())):
    x = input()[::-1]
    for i in range(len(x)):
        if x[i] != '0':
            print(x[i] + "0" * i, end = " ")
    print()


for mda in range(int(input())):
    x = input()[::-1]
    print(len(x) - x.count('0'))
    for i in range(len(x)):
        if x[i] != '0':
            print(x[i] + "0" * i, end = " ")
    print()


for mda in range(int(input())):
    x = input()[::-1]
    for i in range(len(x)):
        if x[i] != '0':
            print(int(x[i] + "0" * i), end = " ")
    print()


t = int(input())
while t:
    z = input()
    le = len(z)-1
    l = []
    for i in range(le):
        l.append(int(z[i] + "0"*(le-i)))
    if int(z[-1]):
        l.append(int(z[-1]))
    for i in l:
        if i:
            print(i, end=" ")
    if t > 1:
        print("")
    t-=1


t = int(input())
while t:
    z = input()
    le = len(z)-1
    l = []
    for i in range(le):
        l.append(z[i] + "0"*(le-i))
    for a in l:
        if int(a)!=0:
            print(a, end=" ")
    if int(z[-1]):
        print(z[-1])
    else:
        print(end="\n")
    t-=1


t = int(input())
while t:
    z = input()
    le = len(z)-1
    l = []
    for i in range(le):
        l.append(int(z[i] + "0"*(le-i)))
    if int(z[-1]):
        l.append(int(z[-1]))
    print(sum([1 for i in l if i > 0]))
    for i in l:
        if i:
            print(i, end=" ")
    if t > 1:
        print("")
    t-=1