#include<unordered_map>
#include<unordered_set>
#include<functional>
#include<algorithm>
#include<iostream>
#include<hash_map>
#include<iterator>
#include<iomanip>
#include<numeric>
#include<cstring>
#include<vector>
#include<bitset>
#include<string>
#include<deque>
#include<stack>
#include<queue>
#include<array>
#include<cmath>
#include<list>
#include<map>
#include<set>

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace __gnu_pbds;
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef double db;
typedef long double ldb;

#define ordered_set tree<ll, null_type,less_equal<ll>, \
rb_tree_tag,tree_order_statistics_node_update>
#define pii pair<int,int>
#define pll pair<ll,ll>
#define inf INT32_MAX
#define linf INT64_MAX
#define pf push_front
#define pb push_back
#define ppb pop_back
#define ppf pop_front
#define ff first
#define ss second

ll fastPow(ll n, ll k/*,ll k*/) {
    if (k == 0)return 1;

    ll res = fastPow(n, k / 2/*,k*/)/*%k*/;

    res = (res * res)/*%k*/;

    if (k & 1)res = (res * n)/*%k*/;

    return res/*%k*/;
}

ll fastPow(ll n, ll k, ll m) {
    if (k == 0)return 1;

    ll res = fastPow(n, k / 2, m) % m;

    res = (res * res) % m;

    if (k & 1)res = (res * n) % m;

    return res % m;
}

ll calcMod(ll a, ll m) {
    return (a % m + m) % m;
}

ll calcMod(ll a, ll b, ll m) {
    return ((a % m) * fastPow(b, m - 2, m)) % m;
}

ll Ceil(ll n, ll m) {
    return (n + m - 1) / m;
}

const ll mod = 998244353, N = 300000 + 5, M = 4 + 5;

/* Go little rockstar */


bool ok(string s1){
    for(int i = 1; i < s1.size(); ++i){
        if(abs(s1[i] - s1[i - 1]) == 1)return 0;
    }
    return 1;
}

void print(string s1, const vector<int> &fa){
    for(const auto&i : s1){
        cout << string(fa[i - 'a'], i);
    }
    cout << "\n";
}

bool solve() {
    string s;
    cin >> s;

    vector<int> fa(26);
    vector<char> c;
    for(int i = 0; i < s.size(); ++i){
        fa[s[i] - 'a']++;
        if(find(c.begin(), c.end(), s[i]) == c.end())c.pb(s[i]);
    }
    sort(c.begin(), c.end());
    

    string s1 = {c[c.size() / 2]};
    int l  = c.size() / 2 - 2, r = c.size() / 2 + 2;

    while(l >= 0 || r < c.size()){
        s1.pb(c[l--]);
        if(r < c.size())s1.pb(c[r++]);
    } 
    if(c.size() / 2 - 1 >= 0)s1.pb(c[c.size() / 2 - 1]);
    if(c.size() / 2 + 1 <  c.size())s1.pb(c[c.size() / 2 + 1]);
    
    if(ok(s1)){
        print(s1, fa);
    }
    else {
        swap(s1[s1.size() - 1], s1[s1.size() - 2]);
        if(ok(s1)){
            print(s1, fa);
        }
        else cout << "No answer\n";
    }
    return 1;
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    int t = 1;
    cin >> t;
    while (t--) {
        solve();
    }
    return 0;
}