#include<bits/stdc++.h>
using namespace std;
int t;
string S;
vector<char> s;
vector<pair<char, int>> ans;
int main() {
	cin >> t;
	while(t--) {
		cin >> S;
		for(int i = 0; i < S.size(); i++) {
			s.push_back(S[i]);
		}
		sort(s.begin(), s.end());
		ans.push_back(make_pair(s[0], 1));
		for(int i = 1; i < s.size(); i++) {
			if(s[i] == ans.back().first) {
				ans.back().second++;
			}
			else {
				ans.push_back(make_pair(s[i], 1));
			}
		}
		/*for(int i = 0; i < ans.size(); i++) {
			cout << ans[i].first << " " << ans[i].second << endl;
		}*/
		if(ans.size() == 1) {
			for(int i = 0; i < ans[0].second; i++) {
				cout << ans[0].first;
			}
			//cout << endl;
		}
		else if(ans.size() == 2) {
			if(ans[0].first == ans[1].first - 1) {
				cout << "No answer" << endl;
			}
			else {
				for(int j = 0; j < ans[0].second; j++) {
					cout << ans[0].first;
				}
				for(int j = 0; j < ans[1].second; j++) {
					cout << ans[1].first;
				}
			}
		}
		else if(ans.size() == 3) {
			if(ans[0].first == ans[1].first - 1 && ans[1].first == ans[2].first - 1) {
				cout << "No answer";
			}
			else {
				for(int j = 0; j < ans[1].second; j++) {
					cout << ans[1].first;
				}
				if(ans[0].first == ans[1].first - 1) {
					for(int j = 0; j < ans[2].second; j++) {
						cout << ans[2].first;
					}
					for(int j = 0; j < ans[0].second; j++) {
						cout << ans[0].first;
					}
				}
				else {
					for(int j = 0; j < ans[0].second; j++) {
						cout << ans[0].first;
					}
					for(int j = 0; j < ans[2].second; j++) {
						cout << ans[2].first;
					}
				}
			}
		}
		else {
			for(int j = 0; j < ans[2].second; j++) {
				cout << ans[2].first;
			}
			for(int j = 0; j < ans[0].second; j++) {
				cout << ans[0].first;
			}
			for(int i = 4; i < ans.size(); i += 2) {
				for(int j = 0; j < ans[i].second; j++) {
					cout << ans[i].first;
				}
			}
			for(int j = 0; j < ans[3].second; j++) {
				cout << ans[3].first;
			}
			for(int j = 0; j < ans[1].second; j++) {
				cout << ans[1].first;
			}
			for(int i = 5; i < ans.size(); i += 2) {
				for(int j = 0; j < ans[i].second; j++) {
					cout << ans[i].first;
				}
			}
			//cout << endl;
		}
		cout << endl;
		ans.clear();
		s.clear();
	}
}


#include<bits/stdc++.h>
using namespace std;
int t;
string S;
vector<char> s;
vector<pair<char, int>> ans;
int main() {
	cin >> t;
	while(t--) {
		cin >> S;
		for(int i = 0; i < S.size(); i++) {
			s.push_back(S[i]);
		}
		sort(s.begin(), s.end());
		ans.push_back(make_pair(s[0], 1));
		for(int i = 1; i < s.size(); i++) {
			if(s[i] == ans.back().first) {
				ans.back().second++;
			}
			else {
				ans.push_back(make_pair(s[i], 1));
			}
		}
		/*for(int i = 0; i < ans.size(); i++) {
			cout << ans[i].first << " " << ans[i].second << endl;
		}*/
		if(ans.size() == 1) {
			for(int i = 0; i < ans[0].second; i++) {
				cout << ans[0].first;
			}
			//cout << endl;
		}
		else if(ans.size() == 2) {
			if(ans[0].first == ans[1].first - 1) {
				cout << "No answer" << endl;
			}
			else {
				for(int j = 0; j < ans[0].second; j++) {
					cout << ans[0].first;
				}
				for(int j = 0; j < ans[1].second; j++) {
					cout << ans[1].first;
				}
			}
		}
		else if(ans.size() == 3) {
			if(ans[0].first == ans[1].first - 1 && ans[1].first == ans[2].first - 1) {
				cout << "No answer" << endl;
			}
			else {
				for(int j = 0; j < ans[1].second; j++) {
					cout << ans[1].first;
				}
				if(ans[0].first == ans[1].first - 1) {
					for(int j = 0; j < ans[2].second; j++) {
						cout << ans[2].first;
					}
					for(int j = 0; j < ans[0].second; j++) {
						cout << ans[0].first;
					}
				}
				else {
					for(int j = 0; j < ans[0].second; j++) {
						cout << ans[0].first;
					}
					for(int j = 0; j < ans[2].second; j++) {
						cout << ans[2].first;
					}
				}
			}
		}
		else {
			for(int j = 0; j < ans[2].second; j++) {
				cout << ans[2].first;
			}
			for(int j = 0; j < ans[0].second; j++) {
				cout << ans[0].first;
			}
			for(int i = 4; i < ans.size(); i += 2) {
				for(int j = 0; j < ans[i].second; j++) {
					cout << ans[i].first;
				}
			}
			for(int j = 0; j < ans[3].second; j++) {
				cout << ans[3].first;
			}
			for(int j = 0; j < ans[1].second; j++) {
				cout << ans[1].first;
			}
			for(int i = 5; i < ans.size(); i += 2) {
				for(int j = 0; j < ans[i].second; j++) {
					cout << ans[i].first;
				}
			}
			//cout << endl;
		}
		cout << endl;
		ans.clear();
		s.clear();
	}
}


#include<bits/stdc++.h>
using namespace std;
int t;
string S;
vector<char> s;
vector<pair<char, int>> ans;
int main() {
	cin >> t;
	while(t--) {
		cin >> S;
		for(int i = 0; i < S.size(); i++) {
			s.push_back(S[i]);
		}
		sort(s.begin(), s.end());
		ans.push_back(make_pair(s[0], 1));
		for(int i = 1; i < s.size(); i++) {
			if(s[i] == ans.back().first) {
				ans.back().second++;
			}
			else {
				ans.push_back(make_pair(s[i], 1));
			}
		}
		/*for(int i = 0; i < ans.size(); i++) {
			cout << ans[i].first << " " << ans[i].second << endl;
		}*/
		if(ans.size() < 4) {
			cout << "No answer" << endl;
		}
		else {
			for(int j = 0; j < ans[2].second; j++) {
				cout << ans[2].first;
			}
			for(int j = 0; j < ans[0].second; j++) {
				cout << ans[0].first;
			}
			for(int i = 4; i < ans.size(); i += 2) {
				for(int j = 0; j < ans[i].second; j++) {
					cout << ans[i].first;
				}
			}
			for(int j = 0; j < ans[3].second; j++) {
				cout << ans[3].first;
			}
			for(int j = 0; j < ans[1].second; j++) {
				cout << ans[1].first;
			}
			for(int i = 5; i < ans.size(); i += 2) {
				for(int j = 0; j < ans[i].second; j++) {
					cout << ans[i].first;
				}
			}
			cout << endl;
		}
		ans.clear();
		s.clear();
	}
}


#include<bits/stdc++.h>
using namespace std;
int t;
string S;
vector<char> s;
vector<pair<char, int>> ans;
int main() {
	cin >> t;
	while(t--) {
		cin >> S;
		for(int i = 0; i < S.size(); i++) {
			s.push_back(S[i]);
		}
		sort(s.begin(), s.end());
		ans.push_back(make_pair(s[0], 1));
		for(int i = 1; i < s.size(); i++) {
			if(s[i] == ans.back().first) {
				ans.back().second++;
			}
			else {
				ans.push_back(make_pair(s[i], 1));
			}
		}
		/*for(int i = 0; i < ans.size(); i++) {
			cout << ans[i].first << " " << ans[i].second << endl;
		}*/
		if(ans.size() == 1) {
			for(int i = 0; i < ans[0].second; i++) {
				cout << ans[0].first;
			}
			//cout << endl;
		}
		else if(ans.size() == 2) {
			if(ans[0].first == ans[1].first - 1) {
				cout << "No answer";
			}
			else {
				for(int j = 0; j < ans[0].second; j++) {
					cout << ans[0].first;
				}
				for(int j = 0; j < ans[1].second; j++) {
					cout << ans[1].first;
				}
			}
		}
		else if(ans.size() == 3) {
			if(ans[0].first == ans[1].first - 1 && ans[1].first == ans[2].first - 1) {
				cout << "No answer";
			}
			else {
				for(int j = 0; j < ans[1].second; j++) {
					cout << ans[1].first;
				}
				if(ans[0].first == ans[1].first - 1) {
					for(int j = 0; j < ans[2].second; j++) {
						cout << ans[2].first;
					}
					for(int j = 0; j < ans[0].second; j++) {
						cout << ans[0].first;
					}
				}
				else {
					for(int j = 0; j < ans[0].second; j++) {
						cout << ans[0].first;
					}
					for(int j = 0; j < ans[2].second; j++) {
						cout << ans[2].first;
					}
				}
			}
		}
		else if(ans.size() == 4) {
			for(int j = 0; j < ans[2].second; j++) {
				cout << ans[2].first;
			}
			for(int j = 0; j < ans[0].second; j++) {
				cout << ans[0].first;
			}
			for(int j = 0; j < ans[3].second; j++) {
				cout << ans[3].first;
			}
			for(int j = 0; j < ans[1].second; j++) {
				cout << ans[1].first;
			}
		}
		else {
			for(int i = 0; i < ans.size(); i += 2) {
				for(int j = 0; j < ans[i].second; j++) {
					cout << ans[i].first;
				}
			}
			for(int i = 1; i < ans.size(); i += 2) {
				for(int j = 0; j < ans[i].second; j++) {
					cout << ans[i].first;
				}
			}
			//cout << endl;
		}
		cout << endl;
		ans.clear();
		s.clear();
	}
}


/*input
4
abcd
gg
codeforces
abaca
*/
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;
typedef complex<ld> cd;

typedef pair<int, int> pi;
typedef pair<ll, ll> pl;
typedef pair<ld, ld> pd;

typedef vector<int> vi;
typedef vector<vi> vii;
typedef vector<ld> vd;
typedef vector<ll> vl;
typedef vector<vl> vll;
typedef vector<pi> vpi;
typedef vector<vpi> vpii;
typedef vector<pl> vpl;
typedef vector<cd> vcd;
typedef vector<pd> vpd;
typedef vector<bool> vb;
typedef vector<vb> vbb;
typedef std::string str;
typedef std::vector<str> vs;

#define x first
#define y second
#define debug(...) cout<<"["<<#__VA_ARGS__<<": "<<__VA_ARGS__<<"]\n"

const int MOD = 1000000007;
const ll INF = std::numeric_limits<ll>::max();
const int MX = 100001;
const ld PI = 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270L;

template<typename T>
pair<T, T> operator+(const pair<T, T> &a, const pair<T, T> &b) { return pair<T, T>(a.x + b.x, a.y + b.y); }
template<typename T>
pair<T, T> operator-(const pair<T, T> &a, const pair<T, T> &b) { return pair<T, T>(a.x - b.x, a.y - b.y); }
template<typename T>
T operator*(const pair<T, T> &a, const pair<T, T> &b) { return (a.x * b.x + a.y * b.y); }
template<typename T>
T operator^(const pair<T, T> &a, const pair<T, T> &b) { return (a.x * b.y - a.y * b.x); }

bool check(str a) {
	for (int i = 1; i < a.size(); ++i)
	{
		if (abs(a[i] - a[i - 1]) == 1)
			return false;
	}
	return true;
}

int main() {
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	int N;
	cin >> N;
	str a;
	for (int i = 0; i < N; ++i)
	{
		cin >> a;
		vi kiek(27, 0);
		for (int j = 0; j < a.size(); ++j)
			kiek[int(a[j] - 'a')]++;

		vs dal;

		for (int k = 0; k < 26; k++) {
			str nauj = "";
			if (!kiek[k]) continue;
			for (int j = 0; j < kiek[k]; ++j)
				nauj += char('a' + k);
			dal.push_back(nauj);
		}

		string gal = "";

		if (dal.size() == 1) {
			gal = dal[0];
			if (check(gal))
				cout << gal << '\n';
			else
				cout << "No answer\n";
		}
		else if (dal.size() == 2) {
			gal = dal[0] + dal[1];
			if (check(gal))
				cout << gal << '\n';
			else
				cout << "No answer\n";
		}
		else if (dal.size() == 3) {
			if (dal[0][0] - dal[1][0] == 1) {
				gal = dal[1] + dal[2] + dal[0];
			} else {
				gal = dal[1] + dal[0] + dal[2];
			}
			if (check(gal))
				cout << gal << '\n';
			else
				cout << "No answer\n";
		}
		else {
			if ((int)dal.size() & 1) {
				for (int l = 0; l < dal.size(); l += 2)
					gal += dal[l];
				for (int l = 1; l < dal.size(); l += 2)
					gal += dal[l];
			} else {
				for (int l = 1; l < dal.size(); l += 2)
					gal += dal[l];
				for (int l = 0; l < dal.size(); l += 2)
					gal += dal[l];
			}

			if (check(gal))
				cout << gal << '\n';
			else
				cout << "No answer\n";
		}
	}
}

/* Look for:
* special cases (n=1?)
* overflow (ll vs int?)
* the exact constraints (multiple sets are too slow for n=10^6 :( )
* array bounds
*/


/*input
1
abe
*/
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;
typedef complex<ld> cd;

typedef pair<int, int> pi;
typedef pair<ll, ll> pl;
typedef pair<ld, ld> pd;

typedef vector<int> vi;
typedef vector<vi> vii;
typedef vector<ld> vd;
typedef vector<ll> vl;
typedef vector<vl> vll;
typedef vector<pi> vpi;
typedef vector<vpi> vpii;
typedef vector<pl> vpl;
typedef vector<cd> vcd;
typedef vector<pd> vpd;
typedef vector<bool> vb;
typedef vector<vb> vbb;
typedef std::string str;
typedef std::vector<str> vs;

#define x first
#define y second
#define debug(...) cout<<"["<<#__VA_ARGS__<<": "<<__VA_ARGS__<<"]\n"

const int MOD = 1000000007;
const ll INF = std::numeric_limits<ll>::max();
const int MX = 100001;
const ld PI = 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270L;

template<typename T>
pair<T, T> operator+(const pair<T, T> &a, const pair<T, T> &b) { return pair<T, T>(a.x + b.x, a.y + b.y); }
template<typename T>
pair<T, T> operator-(const pair<T, T> &a, const pair<T, T> &b) { return pair<T, T>(a.x - b.x, a.y - b.y); }
template<typename T>
T operator*(const pair<T, T> &a, const pair<T, T> &b) { return (a.x * b.x + a.y * b.y); }
template<typename T>
T operator^(const pair<T, T> &a, const pair<T, T> &b) { return (a.x * b.y - a.y * b.x); }

bool check(str a) {
	for (int i = 1; i < a.size(); ++i)
	{
		if (abs(a[i] - a[i - 1]) == 1)
			return false;
	}
	return true;
}

int main() {
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	int N;
	cin >> N;
	str a;
	for (int i = 0; i < N; ++i)
	{
		cin >> a;
		vi kiek(27, 0);
		for (int j = 0; j < a.size(); ++j)
			kiek[int(a[j] - 'a')]++;

		vs dal;

		for (int k = 0; k < 26; k++) {
			str nauj = "";
			if (!kiek[k]) continue;
			for (int j = 0; j < kiek[k]; ++j)
				nauj += char('a' + k);
			dal.push_back(nauj);
		}

		string gal = "";

		if (dal.size() == 1) {
			gal = dal[0];
			if (check(gal))
				cout << gal << '\n';
			else
				cout << "No answer\n";
		}
		else if (dal.size() == 2) {
			gal = dal[0] + dal[1];
			if (check(gal))
				cout << gal << '\n';
			else
				cout << "No answer\n";
		}
		else if (dal.size() == 3) {
			if (dal[1][0] - dal[0][0] == 1) {
				gal = dal[1] + dal[2] + dal[0];
			} else {
				gal = dal[1] + dal[0] + dal[2];
			}
			if (check(gal))
				cout << gal << '\n';
			else
				cout << "No answer\n";
		}
		else {
			if ((int)dal.size() & 1) {
				for (int l = 0; l < dal.size(); l += 2)
					gal += dal[l];
				for (int l = 1; l < dal.size(); l += 2)
					gal += dal[l];
			} else {
				for (int l = 1; l < dal.size(); l += 2)
					gal += dal[l];
				for (int l = 0; l < dal.size(); l += 2)
					gal += dal[l];
			}

			if (check(gal))
				cout << gal << '\n';
			else
				cout << "No answer\n";
		}
	}
}

/* Look for:
* special cases (n=1?)
* overflow (ll vs int?)
* the exact constraints (multiple sets are too slow for n=10^6 :( )
* array bounds
*/


/*input
4
abcd
gg
codeforces
abaca
*/
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;
typedef complex<ld> cd;

typedef pair<int, int> pi;
typedef pair<ll, ll> pl;
typedef pair<ld, ld> pd;

typedef vector<int> vi;
typedef vector<vi> vii;
typedef vector<ld> vd;
typedef vector<ll> vl;
typedef vector<vl> vll;
typedef vector<pi> vpi;
typedef vector<vpi> vpii;
typedef vector<pl> vpl;
typedef vector<cd> vcd;
typedef vector<pd> vpd;
typedef vector<bool> vb;
typedef vector<vb> vbb;
typedef std::string str;
typedef std::vector<str> vs;

#define x first
#define y second
#define debug(...) cout<<"["<<#__VA_ARGS__<<": "<<__VA_ARGS__<<"]\n"

const int MOD = 1000000007;
const ll INF = std::numeric_limits<ll>::max();
const int MX = 100001;
const ld PI = 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270L;

template<typename T>
pair<T, T> operator+(const pair<T, T> &a, const pair<T, T> &b) { return pair<T, T>(a.x + b.x, a.y + b.y); }
template<typename T>
pair<T, T> operator-(const pair<T, T> &a, const pair<T, T> &b) { return pair<T, T>(a.x - b.x, a.y - b.y); }
template<typename T>
T operator*(const pair<T, T> &a, const pair<T, T> &b) { return (a.x * b.x + a.y * b.y); }
template<typename T>
T operator^(const pair<T, T> &a, const pair<T, T> &b) { return (a.x * b.y - a.y * b.x); }

bool check(str a) {
	for (int i = 1; i < a.size(); ++i)
	{
		if (abs(a[i] - a[i - 1]) == 1)
			return false;
	}
	return true;
}

int main() {
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	int N;
	cin >> N;
	str a;
	for (int i = 0; i < N; ++i)
	{
		cin >> a;
		vi kiek(27, 0);
		for (int j = 0; j < a.size(); ++j)
			kiek[int(a[j] - 'a')]++;

		vs dal;

		for (int k = 0; k < 26; k++) {
			str nauj = "";
			if (!kiek[k]) continue;
			for (int j = 0; j < kiek[k]; ++j)
				nauj += char('a' + k);
			dal.push_back(nauj);
		}

		string gal = "";

		if (dal.size() == 1) {
			gal = dal[0];
			if (check(gal))
				cout << gal << '\n';
			else
				cout << "No answer\n";
		}
		else if (dal.size() == 2) {
			gal = dal[0] + dal[1];
			if (check(gal))
				cout << gal << '\n';
			else
				cout << "No answer\n";
		}
		else if (dal.size() == 3) {
			if (dal[0][0] - dal[1][0] == 1) {
				gal = dal[0] + dal[2] + dal[1];
			} else {
				gal = dal[2] + dal[0] + dal[1];
			}
			if (check(gal))
				cout << gal << '\n';
			else
				cout << "No answer\n";
		}
		else {
			if ((int)dal.size() & 1) {
				for (int l = 0; l < dal.size(); l += 2)
					gal += dal[l];
				for (int l = 1; l < dal.size(); l += 2)
					gal += dal[l];
			} else {
				for (int l = 1; l < dal.size(); l += 2)
					gal += dal[l];
				for (int l = 0; l < dal.size(); l += 2)
					gal += dal[l];
			}

			if (check(gal))
				cout << gal << '\n';
			else
				cout << "No answer\n";
		}
	}
}

/* Look for:
* special cases (n=1?)
* overflow (ll vs int?)
* the exact constraints (multiple sets are too slow for n=10^6 :( )
* array bounds
*/


/*input
4
abcd
gg
codeforces
abaca
*/
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;
typedef complex<ld> cd;

typedef pair<int, int> pi;
typedef pair<ll, ll> pl;
typedef pair<ld, ld> pd;

typedef vector<int> vi;
typedef vector<vi> vii;
typedef vector<ld> vd;
typedef vector<ll> vl;
typedef vector<vl> vll;
typedef vector<pi> vpi;
typedef vector<vpi> vpii;
typedef vector<pl> vpl;
typedef vector<cd> vcd;
typedef vector<pd> vpd;
typedef vector<bool> vb;
typedef vector<vb> vbb;
typedef std::string str;
typedef std::vector<str> vs;

#define x first
#define y second
#define debug(...) cout<<"["<<#__VA_ARGS__<<": "<<__VA_ARGS__<<"]\n"

const int MOD = 1000000007;
const ll INF = std::numeric_limits<ll>::max();
const int MX = 100001;
const ld PI = 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270L;

template<typename T>
pair<T, T> operator+(const pair<T, T> &a, const pair<T, T> &b) { return pair<T, T>(a.x + b.x, a.y + b.y); }
template<typename T>
pair<T, T> operator-(const pair<T, T> &a, const pair<T, T> &b) { return pair<T, T>(a.x - b.x, a.y - b.y); }
template<typename T>
T operator*(const pair<T, T> &a, const pair<T, T> &b) { return (a.x * b.x + a.y * b.y); }
template<typename T>
T operator^(const pair<T, T> &a, const pair<T, T> &b) { return (a.x * b.y - a.y * b.x); }

bool check(str a) {
	for (int i = 1; i < a.size(); ++i)
	{
		if (abs(a[i] - a[i - 1]) == 1)
			return false;
	}
	return true;
}

int main() {
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	int N;
	cin >> N;
	str a;
	for (int i = 0; i < N; ++i)
	{
		cin >> a;
		vi kiek(27, 0);
		for (int j = 0; j < a.size(); ++j)
			kiek[int(a[j] - 'a')]++;

		vs dal;

		for (int k = 0; k < 26; k++) {
			str nauj = "";
			if (!kiek[k]) continue;
			for (int j = 0; j < kiek[k]; ++j)
				nauj += char('a' + k);
			dal.push_back(nauj);
		}

		string gal = "";
		if ((int)dal.size() & 1) {
			for (int l = 0; l < dal.size(); l += 2)
				gal += dal[l];
			for (int l = 1; l < dal.size(); l += 2)
				gal += dal[l];
		} else {
			for (int l = 1; l < dal.size(); l += 2)
				gal += dal[l];
			for (int l = 0; l < dal.size(); l += 2)
				gal += dal[l];
		}

		if (check(gal))
			cout << gal << '\n';
		else
			cout << "No answer\n";
	}
}

/* Look for:
* special cases (n=1?)
* overflow (ll vs int?)
* the exact constraints (multiple sets are too slow for n=10^6 :( )
* array bounds
*/


/*input
4
abcd
gg
codeforces
abaca
*/
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;
typedef complex<ld> cd;

typedef pair<int, int> pi;
typedef pair<ll, ll> pl;
typedef pair<ld, ld> pd;

typedef vector<int> vi;
typedef vector<vi> vii;
typedef vector<ld> vd;
typedef vector<ll> vl;
typedef vector<vl> vll;
typedef vector<pi> vpi;
typedef vector<vpi> vpii;
typedef vector<pl> vpl;
typedef vector<cd> vcd;
typedef vector<pd> vpd;
typedef vector<bool> vb;
typedef vector<vb> vbb;
typedef std::string str;
typedef std::vector<str> vs;

#define x first
#define y second
#define debug(...) cout<<"["<<#__VA_ARGS__<<": "<<__VA_ARGS__<<"]\n"

const int MOD = 1000000007;
const ll INF = std::numeric_limits<ll>::max();
const int MX = 100001;
const ld PI = 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270L;

template<typename T>
pair<T, T> operator+(const pair<T, T> &a, const pair<T, T> &b) { return pair<T, T>(a.x + b.x, a.y + b.y); }
template<typename T>
pair<T, T> operator-(const pair<T, T> &a, const pair<T, T> &b) { return pair<T, T>(a.x - b.x, a.y - b.y); }
template<typename T>
T operator*(const pair<T, T> &a, const pair<T, T> &b) { return (a.x * b.x + a.y * b.y); }
template<typename T>
T operator^(const pair<T, T> &a, const pair<T, T> &b) { return (a.x * b.y - a.y * b.x); }

bool check(str a) {
	for (int i = 1; i < a.size(); ++i)
	{
		if (abs(a[i] - a[i - 1]) == 1)
			return false;
	}
	return true;
}

int main() {
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	int N;
	cin >> N;
	str a;
	for (int i = 0; i < N; ++i)
	{
		cin >> a;
		vi kiek(27, 0);
		for (int j = 0; j < a.size(); ++j)
			kiek[int(a[j] - 'a')]++;

		str nauj = "";

		for (int k = 1; k < 26; k += 2)
			for (int j = 0; j < kiek[k]; ++j)
				nauj += char('a' + k);
		for (int k = 0; k < 26; k += 2)
			for (int j = 0; j < kiek[k]; ++j)
				nauj += char('a' + k);

		if (check(nauj))
			cout << nauj << '\n';
		else
			cout << "No answer\n";
	}
}

/* Look for:
* special cases (n=1?)
* overflow (ll vs int?)
* the exact constraints (multiple sets are too slow for n=10^6 :( )
* array bounds
*/


/*input
4
abcd
gg
codeforces
abaca
*/
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;
typedef complex<ld> cd;

typedef pair<int, int> pi;
typedef pair<ll, ll> pl;
typedef pair<ld, ld> pd;

typedef vector<int> vi;
typedef vector<vi> vii;
typedef vector<ld> vd;
typedef vector<ll> vl;
typedef vector<vl> vll;
typedef vector<pi> vpi;
typedef vector<vpi> vpii;
typedef vector<pl> vpl;
typedef vector<cd> vcd;
typedef vector<pd> vpd;
typedef vector<bool> vb;
typedef vector<vb> vbb;
typedef std::string str;
typedef std::vector<str> vs;

#define x first
#define y second
#define debug(...) cout<<"["<<#__VA_ARGS__<<": "<<__VA_ARGS__<<"]\n"

const int MOD = 1000000007;
const ll INF = std::numeric_limits<ll>::max();
const int MX = 100001;
const ld PI = 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270L;

template<typename T>
pair<T, T> operator+(const pair<T, T> &a, const pair<T, T> &b) { return pair<T, T>(a.x + b.x, a.y + b.y); }
template<typename T>
pair<T, T> operator-(const pair<T, T> &a, const pair<T, T> &b) { return pair<T, T>(a.x - b.x, a.y - b.y); }
template<typename T>
T operator*(const pair<T, T> &a, const pair<T, T> &b) { return (a.x * b.x + a.y * b.y); }
template<typename T>
T operator^(const pair<T, T> &a, const pair<T, T> &b) { return (a.x * b.y - a.y * b.x); }

bool check(str a) {
	for (int i = 1; i < a.size(); ++i)
	{
		if (a[i] - a[i - 1] == 1)
			return false;
	}
	return true;
}

int main() {
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	int N;
	cin >> N;
	str a;
	for (int i = 0; i < N; ++i)
	{
		cin >> a;
		vi kiek(27, 0);
		for (int j = 0; j < a.size(); ++j)
			kiek[int(a[j] - 'a')]++;

		str nauj = "";
		for (int k = 0; k < 26; k += 2)
			for (int j = 0; j < kiek[k]; ++j)
				nauj += char('a' + k);

		for (int k = 1; k < 26; k += 2)
			for (int j = 0; j < kiek[k]; ++j)
				nauj += char('a' + k);

		if(check(nauj))
			cout << nauj << '\n';
		else
			cout << "No answer\n";
	}
}

/* Look for:
* special cases (n=1?)
* overflow (ll vs int?)
* the exact constraints (multiple sets are too slow for n=10^6 :( )
* array bounds
*/


/*input
4
abcd
gg
codeforces
abaca
*/
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;
typedef complex<ld> cd;

typedef pair<int, int> pi;
typedef pair<ll, ll> pl;
typedef pair<ld, ld> pd;

typedef vector<int> vi;
typedef vector<vi> vii;
typedef vector<ld> vd;
typedef vector<ll> vl;
typedef vector<vl> vll;
typedef vector<pi> vpi;
typedef vector<vpi> vpii;
typedef vector<pl> vpl;
typedef vector<cd> vcd;
typedef vector<pd> vpd;
typedef vector<bool> vb;
typedef vector<vb> vbb;
typedef std::string str;
typedef std::vector<str> vs;

#define x first
#define y second
#define debug(...) cout<<"["<<#__VA_ARGS__<<": "<<__VA_ARGS__<<"]\n"

const int MOD = 1000000007;
const ll INF = std::numeric_limits<ll>::max();
const int MX = 100001;
const ld PI = 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270L;

template<typename T>
pair<T, T> operator+(const pair<T, T> &a, const pair<T, T> &b) { return pair<T, T>(a.x + b.x, a.y + b.y); }
template<typename T>
pair<T, T> operator-(const pair<T, T> &a, const pair<T, T> &b) { return pair<T, T>(a.x - b.x, a.y - b.y); }
template<typename T>
T operator*(const pair<T, T> &a, const pair<T, T> &b) { return (a.x * b.x + a.y * b.y); }
template<typename T>
T operator^(const pair<T, T> &a, const pair<T, T> &b) { return (a.x * b.y - a.y * b.x); }

bool check(str a) {
	for (int i = 1; i < a.size(); ++i)
	{
		if (abs(a[i] - a[i - 1]) == 1)
			return false;
	}
	return true;
}

int main() {
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	int N;
	cin >> N;
	str a;
	for (int i = 0; i < N; ++i)
	{
		cin >> a;
		vi kiek(27, 0);
		for (int j = 0; j < a.size(); ++j)
			kiek[int(a[j] - 'a')]++;

		vs dal;

		for (int k = 0; k < 26; k++) {
			str nauj = "";
			if (!kiek[k]) continue;
			for (int j = 0; j < kiek[k]; ++j)
				nauj += char('a' + k);
			dal.push_back(nauj);
		}

		string gal = "";
		for (int l = 1; l < dal.size(); l += 2)
			gal += dal[l];
		for (int l = 0; l < dal.size(); l += 2)
			gal += dal[l];

		if (check(gal))
			cout << gal << '\n';
		else
			cout << "No answer\n";
	}
}

/* Look for:
* special cases (n=1?)
* overflow (ll vs int?)
* the exact constraints (multiple sets are too slow for n=10^6 :( )
* array bounds
*/


#include <bits/stdc++.h>
#define lo(i, n, m) for (int i = n; i < m; i++)
#define loe(i, n, m) for (int i = n; i <= m; i++)
#define rlo(i, n, m) for (int i = n - 1; i >= m; i--)
#define rloe(i, n, m) for (int i = n; i >= m; i--)
#define pb push_back
#define mk make_pair
#define scd(x) scanf("%d", &x)
#define scs(x) scanf("%s", x)
#define sclf(x) scanf("%lf", &x)
#define scll(x) scanf("%lld", &x)
#define clr(a, b) memset((a), (b), sizeof(a))
typedef long long LL;
using namespace std;
// const int INF = 0x3f3f3f3f;
// const int INF = 0x7fffffff;
// const LL INF = 0x3f3f3f3f3f3f3f3f;
// const LL INF = 0x7fffffffffffffff;
const int NIL = -1;
template <class T>
inline T mx(T a, T b) {return a > b ? a : b;}
template <class T>
inline T mi(T a, T b) {return a < b ? a : b;}
template <class T>
inline void sw(T &a, T &b) {
    T t = a; a = b; b = t;
}
template <class T>
inline T mabs(T x) {return x < 0 ? -x : x;}
inline char gc() {
    char ret;
    while ((ret = getchar()) == ' ' || ret == '\n' || ret == '\t');
    return ret;
}
template <class T>
inline T sq(T x) {return x * x;}

string str;
int main() {
    ios::sync_with_stdio(false);
    cin.tie(NULL), cout.tie(NULL);
    int T;
    cin >> T;
    while (T--) {
        cin >> str;
        lo(i, 1, str.size()) {
            int r = ((str[i] - str[i - 1] + 1) % 26 + 26) % 26;
            if (r == 0 || r == 2) {
                bool flag = true;
                lo(j, i + 1, str.size()) {
                    int tr = ((str[i] - str[j - 1] + 1) % 26 + 26) % 26;
                    if (str[j] != str[i] && tr != 0 && tr != 2) {
                        sw(str[i], str[j]);
                        flag = false;
                        break;
                    }
                }
                if (flag) {
                    cout << "No answer\n";
                    goto OUT;
                }
            }
        }
        cout << str << '\n';
OUT:
        int a = 1;
    }
    return 0;
}


#include <bits/stdc++.h>
#define lo(i, n, m) for (int i = n; i < m; i++)
#define loe(i, n, m) for (int i = n; i <= m; i++)
#define rlo(i, n, m) for (int i = n - 1; i >= m; i--)
#define rloe(i, n, m) for (int i = n; i >= m; i--)
#define pb push_back
#define mk make_pair
#define scd(x) scanf("%d", &x)
#define scs(x) scanf("%s", x)
#define sclf(x) scanf("%lf", &x)
#define scll(x) scanf("%lld", &x)
#define clr(a, b) memset((a), (b), sizeof(a))
typedef long long LL;
using namespace std;
// const int INF = 0x3f3f3f3f;
// const int INF = 0x7fffffff;
// const LL INF = 0x3f3f3f3f3f3f3f3f;
// const LL INF = 0x7fffffffffffffff;
const int NIL = -1;
template <class T>
inline T mx(T a, T b) {return a > b ? a : b;}
template <class T>
inline T mi(T a, T b) {return a < b ? a : b;}
template <class T>
inline void sw(T &a, T &b) {
    T t = a; a = b; b = t;
}
template <class T>
inline T mabs(T x) {return x < 0 ? -x : x;}
inline char gc() {
    char ret;
    while ((ret = getchar()) == ' ' || ret == '\n' || ret == '\t');
    return ret;
}
template <class T>
inline T sq(T x) {return x * x;}

string str;
int cnt[30];
int main() {
    ios::sync_with_stdio(false);
    cin.tie(NULL), cout.tie(NULL);
    int T;
    cin >> T;
    string a, b, c;
    while (T--) {
        a = b = "";
        cin >> c;
        lo(i, 0, c.size()) if (c[i] & 1) a += c[i]; else b += c[i];
        sort(a.begin(), a.end()), sort(b.begin(), b.end());
        c = a + b;
        bool flag = true;
        lo(i, 1, c.size()) {
            if (c[i] == c[i - 1] + 1 || c[i] == c[i - 1] - 1) flag = false;
            if (!flag) break;
        }
        if (flag) {cout << c << '\n'; continue;}
        flag = true;
        c = b + a;
        lo(i, 1, c.size()) {
            if (c[i] == c[i - 1] + 1 || c[i] == c[i - 1] - 1) flag = false;
            if (!flag) break;
        }
        if (flag) cout << c << '\n';
        else cout << "No answer" << '\n';
    }
    return 0;
}


#include <bits/stdc++.h>
#define lo(i, n, m) for (int i = n; i < m; i++)
#define loe(i, n, m) for (int i = n; i <= m; i++)
#define rlo(i, n, m) for (int i = n - 1; i >= m; i--)
#define rloe(i, n, m) for (int i = n; i >= m; i--)
#define pb push_back
#define mk make_pair
#define scd(x) scanf("%d", &x)
#define scs(x) scanf("%s", x)
#define sclf(x) scanf("%lf", &x)
#define scll(x) scanf("%lld", &x)
#define clr(a, b) memset((a), (b), sizeof(a))
typedef long long LL;
using namespace std;
// const int INF = 0x3f3f3f3f;
// const int INF = 0x7fffffff;
// const LL INF = 0x3f3f3f3f3f3f3f3f;
// const LL INF = 0x7fffffffffffffff;
const int NIL = -1;
template <class T>
inline T mx(T a, T b) {return a > b ? a : b;}
template <class T>
inline T mi(T a, T b) {return a < b ? a : b;}
template <class T>
inline void sw(T &a, T &b) {
    T t = a; a = b; b = t;
}
template <class T>
inline T mabs(T x) {return x < 0 ? -x : x;}
inline char gc() {
    char ret;
    while ((ret = getchar()) == ' ' || ret == '\n' || ret == '\t');
    return ret;
}
template <class T>
inline T sq(T x) {return x * x;}

string str;
int cnt[30];
int main() {
    ios::sync_with_stdio(false);
    cin.tie(NULL), cout.tie(NULL);
    int T;
    cin >> T;
    string a, b, c;
    while (T--) {
        a = b = "";
        cin >> c;
        lo(i, 0, c.size()) if (c[i] & 1) a += c[i]; else b += c[i];
        sort(a.begin(), a.end()), sort(b.begin(), b.end());
        c = a + b;
        bool flag = true;
        lo(i, 1, c.size()) {
            if (c[i] == 'z' && c[i - 1] == 'a') flag = false;
            if (c[i] == 'a' && c[i - 1] == 'z') flag = false;
            if (c[i] == c[i - 1] + 1) flag = false;
            if (!flag) break;
        }
        if (flag) {cout << c << '\n'; continue;}
        flag = true;
        c = b + a;
        lo(i, 1, c.size()) {
            if (c[i] == 'z' && c[i - 1] == 'a') flag = false;
            if (c[i] == 'a' && c[i - 1] == 'z') flag = false;
            if (c[i] == c[i - 1] + 1) flag = false;
            if (!flag) break;
        }
        if (flag) cout << c << '\n';
        else cout << "No answer" << '\n';
    }
    return 0;
}


#include <bits/stdc++.h>
#define lo(i, n, m) for (int i = n; i < m; i++)
#define loe(i, n, m) for (int i = n; i <= m; i++)
#define rlo(i, n, m) for (int i = n - 1; i >= m; i--)
#define rloe(i, n, m) for (int i = n; i >= m; i--)
#define pb push_back
#define mk make_pair
#define scd(x) scanf("%d", &x)
#define scs(x) scanf("%s", x)
#define sclf(x) scanf("%lf", &x)
#define scll(x) scanf("%lld", &x)
#define clr(a, b) memset((a), (b), sizeof(a))
typedef long long LL;
using namespace std;
// const int INF = 0x3f3f3f3f;
// const int INF = 0x7fffffff;
// const LL INF = 0x3f3f3f3f3f3f3f3f;
// const LL INF = 0x7fffffffffffffff;
const int NIL = -1;
template <class T>
inline T mx(T a, T b) {return a > b ? a : b;}
template <class T>
inline T mi(T a, T b) {return a < b ? a : b;}
template <class T>
inline void sw(T &a, T &b) {
    T t = a; a = b; b = t;
}
template <class T>
inline T mabs(T x) {return x < 0 ? -x : x;}
inline char gc() {
    char ret;
    while ((ret = getchar()) == ' ' || ret == '\n' || ret == '\t');
    return ret;
}
template <class T>
inline T sq(T x) {return x * x;}

string str;
int cnt[110];
int main() {
    ios::sync_with_stdio(false);
    cin.tie(NULL), cout.tie(NULL);
    int T;
    cin >> T;
    while (T--) {
        cin >> str;
        int lim = str.size() * str.size();
        bool f = true;
        bool st = true;
        int cx = 0;
STA:
        f = st = true;
        clr(cnt, 0);
        while (st) {
            st = false;
            lo(i, 1, str.size()) {
                if (cnt[i] > lim) {
                    f = false;
                    break;
                }
                int r = ((str[i] - str[i - 1] + 1) % 26 + 26) % 26;
                if (r == 0 || r == 2) {
                    st = true;
                    cnt[i]++;
                    lo(j, 1, str.size()) {
                        int tr = ((str[i] - str[j - 1] + 1) % 26 + 26) % 26;
                        if (str[j] != str[i] && tr != 0 && tr != 2 && j != i && j != i - 1) {
                            sw(str[i], str[j]);
                            break;
                        }
                    }
                }
            }
            if (!f) break;
        }
        if (f) cout << str << '\n';
        else {
            if (cx == 1)
                cout << "No answer\n";
            else {
                cx = 1;
                sw(str[0], str[1]);
                goto STA;
            }
        }
    }
    return 0;
}


#include <bits/stdc++.h>
#define lo(i, n, m) for (int i = n; i < m; i++)
#define loe(i, n, m) for (int i = n; i <= m; i++)
#define rlo(i, n, m) for (int i = n - 1; i >= m; i--)
#define rloe(i, n, m) for (int i = n; i >= m; i--)
#define pb push_back
#define mk make_pair
#define scd(x) scanf("%d", &x)
#define scs(x) scanf("%s", x)
#define sclf(x) scanf("%lf", &x)
#define scll(x) scanf("%lld", &x)
#define clr(a, b) memset((a), (b), sizeof(a))
typedef long long LL;
using namespace std;
// const int INF = 0x3f3f3f3f;
// const int INF = 0x7fffffff;
// const LL INF = 0x3f3f3f3f3f3f3f3f;
// const LL INF = 0x7fffffffffffffff;
const int NIL = -1;
template <class T>
inline T mx(T a, T b) {return a > b ? a : b;}
template <class T>
inline T mi(T a, T b) {return a < b ? a : b;}
template <class T>
inline void sw(T &a, T &b) {
    T t = a; a = b; b = t;
}
template <class T>
inline T mabs(T x) {return x < 0 ? -x : x;}
inline char gc() {
    char ret;
    while ((ret = getchar()) == ' ' || ret == '\n' || ret == '\t');
    return ret;
}
template <class T>
inline T sq(T x) {return x * x;}

string str;
int cnt[30];
int main() {
    ios::sync_with_stdio(false);
    cin.tie(NULL), cout.tie(NULL);
    int T;
    cin >> T;
    string a, b, c;
    while (T--) {
        a = b = "";
        cin >> c;
        lo(i, 0, c.size()) if (c[i] & 1) a += c[i]; else b += c[i];
        sort(a.begin(), a.end()), sort(b.begin(), b.end());
        c = a + b;
        bool flag = true;
        lo(i, 1, c.size()) {
            if (c[i] == 'z' && c[i - 1] == 'a') flag = false;
            if (c[i] == 'a' && c[i - 1] == 'z') flag = false;
            if (c[i] == c[i - 1] + 1 || c[i] == c[i - 1] - 1) flag = false;
            if (!flag) break;
        }
        if (flag) {cout << c << '\n'; continue;}
        flag = true;
        c = b + a;
        lo(i, 1, c.size()) {
            if (c[i] == 'z' && c[i - 1] == 'a') flag = false;
            if (c[i] == 'a' && c[i - 1] == 'z') flag = false;
            if (c[i] == c[i - 1] + 1 || c[i] == c[i - 1] - 1) flag = false;
            if (!flag) break;
        }
        if (flag) cout << c << '\n';
        else cout << "No answer" << '\n';
    }
    return 0;
}


#include <bits/stdc++.h>
#define lo(i, n, m) for (int i = n; i < m; i++)
#define loe(i, n, m) for (int i = n; i <= m; i++)
#define rlo(i, n, m) for (int i = n - 1; i >= m; i--)
#define rloe(i, n, m) for (int i = n; i >= m; i--)
#define pb push_back
#define mk make_pair
#define scd(x) scanf("%d", &x)
#define scs(x) scanf("%s", x)
#define sclf(x) scanf("%lf", &x)
#define scll(x) scanf("%lld", &x)
#define clr(a, b) memset((a), (b), sizeof(a))
typedef long long LL;
using namespace std;
// const int INF = 0x3f3f3f3f;
// const int INF = 0x7fffffff;
// const LL INF = 0x3f3f3f3f3f3f3f3f;
// const LL INF = 0x7fffffffffffffff;
const int NIL = -1;
template <class T>
inline T mx(T a, T b) {return a > b ? a : b;}
template <class T>
inline T mi(T a, T b) {return a < b ? a : b;}
template <class T>
inline void sw(T &a, T &b) {
    T t = a; a = b; b = t;
}
template <class T>
inline T mabs(T x) {return x < 0 ? -x : x;}
inline char gc() {
    char ret;
    while ((ret = getchar()) == ' ' || ret == '\n' || ret == '\t');
    return ret;
}
template <class T>
inline T sq(T x) {return x * x;}

string str;
int cnt[30];
int main() {
    ios::sync_with_stdio(false);
    cin.tie(NULL), cout.tie(NULL);
    int T;
    cin >> T;
    string a, b, c;
    while (T--) {
        a = b = "";
        cin >> c;
        lo(i, 0, c.size()) if (c[i] & 1) a += c[i]; else b += c[i];
        sort(a.begin(), a.end()), sort(b.begin(), b.end());
        c = a + b;
        bool flag = true;
        lo(i, 1, c.size()) {
            if (c[i] == 'a' && c[i - 1] == 'z') flag = false;
            if (c[i] == c[i - 1] + 1 || c[i] == c[i - 1] - 1) flag = false;
            if (!flag) break;
        }
        if (flag) {cout << c << '\n'; continue;}
        flag = true;
        c = b + a;
        lo(i, 1, c.size()) {
            if (c[i] == 'a' && c[i - 1] == 'z') flag = false;
            if (c[i] == c[i - 1] + 1 || c[i] == c[i - 1] - 1) flag = false;
            if (!flag) break;
        }
        if (flag) cout << c << '\n';
        else cout << "No answer" << '\n';
    }
    return 0;
}


#include <bits/stdc++.h>
#define lo(i, n, m) for (int i = n; i < m; i++)
#define loe(i, n, m) for (int i = n; i <= m; i++)
#define rlo(i, n, m) for (int i = n - 1; i >= m; i--)
#define rloe(i, n, m) for (int i = n; i >= m; i--)
#define pb push_back
#define mk make_pair
#define scd(x) scanf("%d", &x)
#define scs(x) scanf("%s", x)
#define sclf(x) scanf("%lf", &x)
#define scll(x) scanf("%lld", &x)
#define clr(a, b) memset((a), (b), sizeof(a))
typedef long long LL;
using namespace std;
// const int INF = 0x3f3f3f3f;
// const int INF = 0x7fffffff;
// const LL INF = 0x3f3f3f3f3f3f3f3f;
// const LL INF = 0x7fffffffffffffff;
const int NIL = -1;
template <class T>
inline T mx(T a, T b) {return a > b ? a : b;}
template <class T>
inline T mi(T a, T b) {return a < b ? a : b;}
template <class T>
inline void sw(T &a, T &b) {
    T t = a; a = b; b = t;
}
template <class T>
inline T mabs(T x) {return x < 0 ? -x : x;}
inline char gc() {
    char ret;
    while ((ret = getchar()) == ' ' || ret == '\n' || ret == '\t');
    return ret;
}
template <class T>
inline T sq(T x) {return x * x;}
const int LIM = 110;
char str[LIM], buf[LIM];
int len, cnt[30];
bool dfs(int crt) {
    if (crt == len) {
        buf[len] = 0;
        return true;
    }
    lo(i, 0, 26) {
        if (crt) {
            int r = ((i + 'a' - buf[crt - 1] + 1) % 26 + 26) % 26;
            if (cnt[i] && r != 0 && r != 2) {
                cnt[i]--;
                buf[crt] = i + 'a';
                if (dfs(crt + 1)) return true;
                cnt[i]++;
            }
        } else {
            if (cnt[i]) {
                cnt[i]--;
                buf[crt] = i + 'a';
                if (dfs(crt + 1)) return true;
                cnt[i]++;
            }
        }
    }
    return false;
}

int main() {
    // ios::sync_with_stdio(false);
    // cin.tie(NULL), cout.tie(NULL);
    int T;
    scd(T);
    while (T--) {
        scs(str);
        len = strlen(str);
        clr(cnt, 0);
        lo(i, 0, len) cnt[str[i] - 'a']++;
        if (dfs(0)) {
            printf("%s\n", buf);
        } else {
            printf("No answer\n");
        }
    }
    return 0;
}


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

int main(){
    int t;
    cin>>t;
    while(t--){
        string s,ans,tmp; int f=1;
        cin>>s;

        for(int j=0;j<s.size();j++){
            tmp = s; ans = "";
            ans.push_back(tmp[j]); tmp.erase(tmp.begin()+j);

            while(tmp.size()){
                int flg=1;
                for(int i=0;i<tmp.size();i++){
                    if(ans.back()+1!=tmp[i] && ans.back()-1!=tmp[i]){
                        ans.push_back(tmp[i]);
                        tmp.erase(tmp.begin()+i);
                        flg=0;
                        break;
                    }
                }
                if(flg)break;
            }
            if(!tmp.size()){
                cout<<ans<<endl;
                f=0;
                break;
            }
        }

        if(f)cout<<"No answer\n";
    }
    return 0;
}


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

int main(){
    int t;
    cin>>t;
    while(t--){
        string s,ans;
        cin>>s;
        vector<int> ar(30);
        for(int i=0;i<s.size();i++){
            ar[s[i]-'a']++;
        }

        for(int i=0;i<26;i++){
            if(ar[i]){
                if(i%2==1){
                    while(ar[i]){
                        ans += (i+'a');
                        ar[i]--;
                    }
                }
            }
        }

        char ch=0;
        for(int i=0;i<26;i++){
            if(ar[i]){
                ch = i+'a';
                break;
            }
        }

        if(ch!=0){
            if(ans.size()){
                if((ans[ans.size()-1]+1 == ch) || (ans[ans.size()-1]-1 == ch)){
                    for(int i=ch-'a'+1;i<26;i++){
                        if(ar[i]){
                            while(ar[i]){
                                ans += i+'a';
                                ar[i]--;
                            }
                        }
                    }
                    if((ans[ans.size()-1]+1 == ch) || (ans[ans.size()-1]-1 == ch)){
                        ans.insert(ans.begin(),ch);
                    }
                    else ans+=ch;
                }
                else{
                    for(int i=0;i<26;i++){
                        if(ar[i]){
                            while(ar[i]){
                                ans += i+'a';
                                ar[i]--;
                            }
                        }
                    }
                }
            }
            else{
                for(int i=0;i<26;i++){
                    if(ar[i]){
                        while(ar[i]){
                            ans += i+'a';
                            ar[i]--;
                        }
                    }
                }
            }
        }

        int flg=1;

        for(int i=1;i<ans.size()-1;i++){
            if(ans[i-1]+1 == ans[i] || ans[i-1]-1 == ans[i] || ans[i+1]-1 == ans[i] || ans[i+1]-1 == ans[i]){
                flg=0;
                break;
            }
        }
        if(ans.size()==2){
            if(ans[0]-1 == ans[1] || ans[0]+1==ans[1])flg=0;
        }

        if(ans==s){
            ans.insert(ans.begin(),ans.back());
            ans.pop_back();
        }

        if(flg)cout<<ans<<"\n";
        else cout<<"No answer\n";

    }

    return 0;
}


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

int main(){
    int t;
    cin>>t;
    while(t--){
        string s,odd,even;
        cin>>s;
        for(int i=0;i<s.size();i++){
            if(s[i]&1)odd += s[i];
            else even += s[i];
        }

        sort(odd.begin(),odd.end());
        sort(even.begin(),even.end());

        if(odd.size()==0 || even.size()==0)cout<<(odd.size()==0?even:odd)<<"\n";
        else if(odd.back()+1 != even[0] && odd.back()-1 != even[0] && odd.back() != even[0]+1 && odd.back() != even[0]-1)cout<<odd+even<<"\n";
        else if(odd[0]+1 != even.back() && odd[0]-1 != even.back() && odd[0] != even.back()+1 && odd[0] != even.back()-1)cout<<even+odd<<"\n";
        else cout<<"No answer\n";
    }

    return 0;
}


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

int main(){
    int t;
    cin>>t;
    while(t--){
        string s,ans;
        cin>>s;
        vector<int> ar(30);
        for(int i=0;i<s.size();i++){
            ar[s[i]-'a']++;
        }

        for(int i=0;i<26;i++){
            if(ar[i]){
                if(i%2==1){
                    while(ar[i]){
                        ans += (i+'a');
                        ar[i]--;
                    }
                }
            }
        }

        char ch=0;
        for(int i=0;i<26;i++){
            if(ar[i]){
                ch = i+'a';
                break;
            }
        }

        if(ch!=0){
            if(ans.size()){
                if((ans[ans.size()-1]+1 == ch) || (ans[ans.size()-1]-1 == ch)){
                    for(int i=ch-'a'+1;i<26;i++){
                        if(ar[i]){
                            while(ar[i]){
                                ans += i+'a';
                                ar[i]--;
                            }
                        }
                    }
                    if((ans[ans.size()-1]+1 == ch) || (ans[ans.size()-1]-1 == ch)){
                        ans.insert(ans.begin(),ch);
                    }
                    else ans+=ch;
                }
                else{
                    for(int i=0;i<26;i++){
                        if(ar[i]){
                            while(ar[i]){
                                ans += i+'a';
                                ar[i]--;
                            }
                        }
                    }
                }
            }
            else{
                for(int i=0;i<26;i++){
                    if(ar[i]){
                        while(ar[i]){
                            ans += i+'a';
                            ar[i]--;
                        }
                    }
                }
            }
        }

        int flg=1;

        for(int i=1;i<ans.size()-1;i++){
            if(ans[i-1]+1 == ans[i] || ans[i-1]-1 == ans[i] || ans[i+1]-1 == ans[i] || ans[i+1]-1 == ans[i]){
                flg=0;
                break;
            }
        }
        if(ans.size()==2){
            if(ans[0]-1 == ans[1] || ans[0]+1==ans[1])flg=0;
        }

        if(flg)cout<<ans<<"\n";
        else cout<<"No answer\n";

    }

    return 0;
}


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

int main(){
    int t;
    cin>>t;
    while(t--){
        string s,ans;
        cin>>s;
        vector<int> ar(30);
        for(int i=0;i<s.size();i++){
            ar[s[i]-'a']++;
        }

        for(int i=0;i<26;i++){
            if(ar[i]){
                if(i%2==1){
                    while(ar[i]){
                        ans += (i+'a');
                        ar[i]--;
                    }
                }
            }
        }

        char ch=0;
        for(int i=0;i<26;i++){
            if(ar[i]){
                ch = i+'a';
                break;
            }
        }

        if(ch!=0){
            if(ans.size()){
                if((ans[ans.size()-1]+1 == ch) || (ans[ans.size()-1]-1 == ch)){
                    for(int i=ch-'a'+1;i<26;i++){
                        if(ar[i]){
                            while(ar[i]){
                                ans += i+'a';
                                ar[i]--;
                            }
                        }
                    }
                    if((ans[ans.size()-1]+1 == ch) || (ans[ans.size()-1]-1 == ch)){
                        ans.insert(ans.begin(),ch);
                    }
                    else ans+=ch;
                }
                else{
                    for(int i=0;i<26;i++){
                        if(ar[i]){
                            while(ar[i]){
                                ans += i+'a';
                                ar[i]--;
                            }
                        }
                    }
                }
            }
            else{
                for(int i=0;i<26;i++){
                    if(ar[i]){
                        while(ar[i]){
                            ans += i+'a';
                            ar[i]--;
                        }
                    }
                }
            }
        }

        int flg=1;

        for(int i=1;i<ans.size()-1;i++){
            if(ans[i-1]+1 == ans[i] || ans[i-1]-1 == ans[i] || ans[i+1]-1 == ans[i] || ans[i+1]-1 == ans[i]){
                flg=0;
                break;
            }
        }
        if(ans.size()==2){
            if(ans[0]-1 == ans[1] || ans[0]+1==ans[1])flg=0;
        }

        if(ans==s){
            ans.insert(ans.begin(),ans[ans.size()-1]);
            ans.pop_back();
        }

        if(flg)cout<<ans<<"\n";
        else cout<<"No answer\n";

    }

    return 0;
}


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

int a[110];
int vis[28];
int len;

bool dfs(int x) {
    if(x == len) {
        for(int i =0;i<len;i++) {
            cout<<(char) (a[i]+'a');
        }
        cout<<endl;
        return true;
    }
    for(int i=0;i<=26;i++) {

        if(vis[i] == 0) continue;
        if(x!=0&&abs(a[x-1]-i)==1) continue;
        vis[i]--;
        a[x] = i;
        if(dfs(x+1)) return true;
        a[x] = 0;
        vis[i]++;

    }
    return false;
}

int main() {
    int t;
    cin>>t;
    while(t--) {
        string s;
        for(int i = 0;i<26;i++) vis[i] = 0;
        int flag = 1;
        cin>>s;
        len = s.size();
        for(int i=0;i<len;i++) {
            if( i!=0 ) if(abs(s[i] - s[(i-1+len)%len]) == 1) flag = 0;
            vis[s[i]-'a']++;
        }
        if(flag == 1) {
            cout<<s<<endl;
            continue ;
        }
        if(!dfs(0)) {
            cout<<"No answer"<<endl;
        }

    }
    return 0;
}


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

int a[110];
int vis[28];
int len;

int main() {
    int t;
    cin>>t;
    while(t--) {
        string s;
        for(int i = 0;i<=26;i++) vis[i] = 0;
        int fro = -1,lso=-1;
        int fre = -1,lse=-1;
        cin>>s;
        len = s.size();
        for(int i=0;i<len;i++) {
            vis[s[i]-'a']++;
            if((s[i]-'a')%2==1) {
                if(fro == -1) {
                    fro = s[i]-'a';
                }
                lso = s[i]-'a';
            }
            else {
                if(fre == -1) {
                    fre = s[i]-'a';
                }
                lse = s[i]-'a';
            }
        }
        if(abs(fro-lse)!=1) {
            int now = 0;
            while(now<=26) {
                if(vis[now]==0) {
                    now+=2;
                    continue;
                }
                cout<<(char)(now+'a');
                vis[now] --;
            }
            now = 1;
            while(now<=26) {
                if(vis[now]==0) {
                    now+=2;
                    continue;
                }
                cout<<(char)(now+'a');
                vis[now] --;
            }
        }
        else if(abs(lso-fre)!=1) {
            int now = 1;
            while(now<=26) {
                if(vis[now]==0) {
                    now+=2;
                    continue;
                }
                cout<<(char)(now+'a');
                vis[now] --;
            }
            now = 0;
            while(now<=26) {
                if(vis[now]==0) {
                    now+=2;
                    continue;
                }
                cout<<(char)(now+'a');
                vis[now] --;
            }
        }
        else  {
            cout<<"No answer";
        }
        cout<<endl;
    }
    return 0;
}


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

int a[110];
int vis[28];
int len;

int main() {
    int t;
    cin>>t;
    while(t--) {
        string s;
        for(int i = 0;i<26;i++) vis[i] = 0;
        int flag = 1;
        int fro = -1,lso=-1;
        int fre = -1,lse=-1;
        cin>>s;
        len = s.size();
        for(int i=0;i<len;i++) {
            if( i!=0 ) if(abs(s[i] - s[(i-1+len)%len]) == 1) flag = 0;
            vis[s[i]-'a']++;
            if((s[i]-'a')%2==1) {
                if(fro == -1) {
                    fro = s[i]-'a';
                }
                lso = s[i]-'a';
            }
            else {
                if(fre == -1) {
                    fre = s[i]-'a';
                }
                lse = s[i]-'a';
            }
        }
        if(flag == 1) {
            cout<<s<<endl;
            continue ;
        }
        if(abs(fro-lse)!=1) {
            int now = 0;
            while(now<=26) {
                if(vis[now]==0) {
                    now+=2;
                    continue;
                }
                cout<<(char)(now+'a');
                vis[now] --;
            }
            now = 1;
            while(now<=26) {
                if(vis[now]==0) {
                    now+=2;
                    continue;
                }
                cout<<(char)(now+'a');
                vis[now] --;
            }
        }
        else if(abs(lso-fre)!=1) {
            int now = 1;
            while(now<=26) {
                if(vis[now]==0) {
                    now+=2;
                    continue;
                }
                cout<<(char)(now+'a');
                vis[now] --;
            }
            now = 0;
            while(now<=26) {
                if(vis[now]==0) {
                    now+=2;
                    continue;
                }
                cout<<(char)(now+'a');
                vis[now] --;
            }
        }
        else  {
            cout<<"No answer";
        }
        cout<<endl;
    }
    return 0;
}


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

int a[110];
int vis[28];
int len;

int main() {
    int t;
    cin>>t;
    while(t--) {
        string s;
        for(int i = 0;i<=26;i++) vis[i] = 0;
        int fro = -100,lso=-100;
        int fre = -100,lse=-100;
        cin>>s;
        len = s.size();
        for(int i=0;i<len;i++) {
            vis[s[i]-'a']++;
            if((s[i]-'a')%2==1) {
                if(fro == -100) {
                    fro = s[i]-'a';
                }
                lso = s[i]-'a';
            }
            else {
                if(fre == -100) {
                    fre = s[i]-'a';
                }
                lse = s[i]-'a';
            }
        }
        if(abs(fro-lse)!=1) {
            int now = 0;
            while(now<=26) {
                if(vis[now]==0) {
                    now+=2;
                    continue;
                }
                cout<<(char)(now+'a');
                vis[now] --;
            }
            now = 1;
            while(now<=26) {
                if(vis[now]==0) {
                    now+=2;
                    continue;
                }
                cout<<(char)(now+'a');
                vis[now] --;
            }
        }
        else if(abs(lso-fre)!=1) {
            int now = 1;
            while(now<=26) {
                if(vis[now]==0) {
                    now+=2;
                    continue;
                }
                cout<<(char)(now+'a');
                vis[now] --;
            }
            now = 0;
            while(now<=26) {
                if(vis[now]==0) {
                    now+=2;
                    continue;
                }
                cout<<(char)(now+'a');
                vis[now] --;
            }
        }
        else  {
            cout<<"No answer";
        }
        cout<<endl;
    }
    return 0;
}


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

int vis[28];
int len;

int main() {
    int t;
    cin>>t;
    while(t--) {
        string s;
        for(int i = 0;i<=26;i++) vis[i] = 0;
        int fro = 100,lso=-100;
        int fre = 100,lse=-100;
        cin>>s;
        len = s.size();
        for(int i=0;i<len;i++) {
            vis[s[i]-'a']++;
            if((s[i]-'a')%2==1) {
                fro = min(fro,s[i]-'a');
                lso = max(lso,s[i]-'a');
            }
            else {
                fre = (fre,s[i]-'a');
                lse = max(lse,s[i]-'a');
            }
        }
        if(abs(fro-lse)!=1) {
            int now = 0;
            while(now<=26) {
                if(vis[now]==0) {
                    now+=2;
                    continue;
                }
                cout<<(char)(now+'a');
                vis[now] --;
            }
            now = 1;
            while(now<=26) {
                if(vis[now]==0) {
                    now+=2;
                    continue;
                }
                cout<<(char)(now+'a');
                vis[now] --;
            }
        }
        else if(abs(lso-fre)!=1) {
            int now = 1;
            while(now<=26) {
                if(vis[now]==0) {
                    now+=2;
                    continue;
                }
                cout<<(char)(now+'a');
                vis[now] --;
            }
            now = 0;
            while(now<=26) {
                if(vis[now]==0) {
                    now+=2;
                    continue;
                }
                cout<<(char)(now+'a');
                vis[now] --;
            }
        }
        else  {
            cout<<"No answer";
        }
        cout<<endl;
    }
    return 0;
}


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

int vis[28];
int len;

int main() {
    int t;
    cin>>t;
    while(t--) {
        string s;
        for(int i = 0;i<=26;i++) vis[i] = 0;
        int fro = 100,lso=-100;
        int fre = 100,lse=-100;
        cin>>s;
        len = s.size();
        for(int i=0;i<len;i++) {
            vis[s[i]-'a']++;
            if((s[i]-'a')%2==1) {
                fro = min(fro,s[i]-'a');
                lso = max(lso,s[i]-'a');
            }
            else {
                fre = min(fre,s[i]-'a');
                lse = max(lse,s[i]-'a');
            }
        }
        if(abs(fro-lse)!=1) {
            int now = 0;
            while(now<=26) {
                if(vis[now]==0) {
                    now+=2;
                    continue;
                }
                cout<<(char)(now+'a');
                vis[now] --;
            }
            now = 1;
            while(now<=26) {
                if(vis[now]==0) {
                    now+=2;
                    continue;
                }
                cout<<(char)(now+'a');
                vis[now] --;
            }
        }
        else if(abs(lso-fre)!=1) {
            int now = 1;
            while(now<=26) {
                if(vis[now]==0) {
                    now+=2;
                    continue;
                }
                cout<<(char)(now+'a');
                vis[now] --;
            }
            now = 0;
            while(now<=26) {
                if(vis[now]==0) {
                    now+=2;
                    continue;
                }
                cout<<(char)(now+'a');
                vis[now] --;
            }
        }
        else  {
            cout<<"No answer";
        }
        cout<<endl;
    }
    return 0;
}


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

int a[110];
int vis[28];
int len;

bool dfs(int x) {
    if(x == len) {
        for(int i =0;i<len;i++) {
            cout<<(char) (a[i]+'a');
        }
        cout<<endl;
        return true;
    }
    for(int i=0;i<=26;i++) {
        if(vis[i] == 0) continue;
        if(x!=0&&abs(a[x-1]-i)==1) continue;
        vis[i]--;
        a[x] = i;
        if(dfs(x+1)) return true;
        a[x] = 0;
        vis[i]++;

    }
    return false;
}

int main() {
    int t;
    cin>>t;
    while(t--) {
        string s;
        int flag = 1;
        cin>>s;
        len = s.size();
        for(int i=0;i<len;i++) {
            if( i!=0 ) if(abs(s[i] - s[(i-1+len)%len]) == 1) flag = 0;
            vis[s[i]-'a']++;
        }
        if(flag == 1) {
            cout<<s<<endl;
            continue ;
        }
        if(!dfs(0)) {
            cout<<"No answer"<<endl;
        }
        for(int i = 0;i<26;i++) vis[i] = 0;
    }
    return 0;
}


//Generated at 2019-11-11 23:55:02 UTC+8
//Created by Alphagocc
#include <bits/stdc++.h>

using namespace std;

#define REP(i, x, y) for (int i = x; i < y; i++)

const int8_t  INFC = 0x3f;
const int16_t INFS = 0x3f3f;
const int32_t INF  = 0x3f3f3f3f;
const int64_t INFL = 0x3f3f3f3f3f3f3f3fLL;

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

string solve()
{
    string s;
    cin >> s;
    int cnt[256];
    memset(cnt, 0, sizeof(cnt));
    for (auto i : s) cnt[i]++;
    int cc = 0;
    for (auto i : cnt) cc += !!i;
    if (cc == 1) return s;
    if (cc == 2)
    {
        sort(s.begin(), s.end());
        string ts = s;
        s.resize(unique(s.begin(), s.end()) - s.begin());
        if (abs(s[0] - s[1]) == 1)
            return "No answer";
        else
            return ts;
    }
    if (cc == 3)
    {
        sort(s.begin(), s.end());
        s.resize(unique(s.begin(), s.end()) - s.begin());
        if (abs(s[0] - s[1]) == 1 && abs(s[1] - s[2]) == 1)
            return "No answer";
        else
        {
            string ta, tb, tc;
            for (int i = 0; i < 256; i++)
                if (cnt[i] > 0)
                {
                    while (cnt[i]--) ta.push_back(i);
                    break;
                }
            for (int i = 0; i < 256; i++)
                if (cnt[i] > 0)
                {
                    while (cnt[i]--) tb.push_back(i);
                    break;
                }
            for (int i = 0; i < 256; i++)
                if (cnt[i] > 0)
                {
                    while (cnt[i]--) tc.push_back(i);
                    break;
                }
            if (check(ta + tb + tc)) return ta + tb + tc;
            if (check(ta + tc + tb)) return ta + tc + tb;
            if (check(tb + ta + tc)) return tb + ta + tc;
            if (check(tb + tc + ta)) return tb + tc + ta;
            if (check(tc + ta + tb)) return tc + ta + tb;
            if (check(tc + tb + ta)) return tc + tb + ta;
            return "No answer";
        }
    }
    string ta, tb;
    for (int i = 1; i < 256; i += 2)
        if (cnt[i])
            while (cnt[i]--) ta.push_back(i);
    for (int i = 0; i < 256; i += 2)
        if (cnt[i])
            while (cnt[i]--) tb.push_back(i);
    if (check(ta + tb)) return ta + tb;
    if (check(tb + ta)) return tb + ta;
    return "No answer";
}
int main()
{
    ios::sync_with_stdio(0);
    int T;
    cin >> T;
    while (T--) { cout << solve() << endl; }
    return 0;
}


//Generated at 2019-11-11 23:45:44 UTC+8
//Created by Alphagocc
#include <bits/stdc++.h>

using namespace std;

#define REP(i, x, y) for (int i = x; i < y; i++)

const int8_t  INFC = 0x3f;
const int16_t INFS = 0x3f3f;
const int32_t INF  = 0x3f3f3f3f;
const int64_t INFL = 0x3f3f3f3f3f3f3f3fLL;

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

string solve()
{
    string s;
    cin >> s;
    int cnt[256];
    memset(cnt, 0, sizeof(cnt));
    for (auto i : s) cnt[i]++;
    int cc = 0;
    for (auto i : cnt) cc += !!i;
    if (cc == 1) return s;
    if (cc == 2)
    {
        sort(s.begin(), s.end());
        string ts = s;
        s.resize(unique(s.begin(), s.end()) - s.begin());
        if (abs(s[0] - s[1]) == 1)
            return "No answer";
        else
            return ts;
    }
    if (cc == 3)
    {
        sort(s.begin(), s.end());
        s.resize(unique(s.begin(), s.end()) - s.begin());
        if (abs(s[0] - s[1]) == 1 && abs(s[1] - s[2]) == 1)
            return "No answer";
        else
        {
            string ta, tb, tc;
            for (int i = 0; i < 256; i++)
                if (cnt[i])
                    while (cnt[i]--) ta.push_back(i);
            for (int i = 0; i < 256; i++)
                if (cnt[i])
                    while (cnt[i]--) tb.push_back(i);
            for (int i = 0; i < 256; i++)
                if (cnt[i])
                    while (cnt[i]--) tc.push_back(i);
            if (check(ta+tb+tc)) return ta+tb+tc;
            if (check(ta+tc+tb)) return ta+tc+tb;
            if (check(tb+ta+tc)) return tb+ta+tc;
            if (check(tb+tc+ta)) return tb+ta+tc;
            if (check(tc+ta+tb)) return tc+ta+tb;
            if (check(tc+tb+ta)) return tc+tb+ta;
            return "No answer";
        }
    }
    string ta,tb;
    for (int i=1;i<256;i+=2)
        if (cnt[i])
            while(cnt[i]--) ta.push_back(i);
    for (int i=0;i<256;i+=2)
        if (cnt[i])
            while(cnt[i]--) tb.push_back(i);
    if (check(ta+tb)) return ta+tb;
    if (check(tb+ta)) return tb+ta;
    return "No answer";
}
int main()
{
    ios::sync_with_stdio(0);
    int T;
    cin >> T;
    while (T--) { cout << solve() << endl; }
    return 0;
}


#include<bits/stdc++.h>

using namespace std;

#define REP(i,x,y) for (int i=x;i<y;i++)

const int8_t INFC=0x3f;
const int16_t INFS=0x3f3f;
const int32_t INF=0x3f3f3f3f;
const int64_t INFL=0x3f3f3f3f3f3f3f3fLL;
string solve()
{
    string s;
    cin >> s;
    int tries=1.1e4;
    while(tries--)
    {
        random_shuffle(s.begin(),s.end());
        bool flg=1;
        for (int i=0;i<s.size()&&flg;i++)
        {
            if (abs(s[i]-s[i-1])==1) flg=0;
        }
        if (flg) return s;
    }
    return "No answer";
}
int main()
{
    ios::sync_with_stdio(0);
    int T;
    cin >> T;
    while(T--)
    {
        cout <<solve() << endl;
    }
    return 0;
}


#include<bits/stdc++.h>

using namespace std;

#define REP(i,x,y) for (int i=x;i<y;i++)

const int8_t INFC=0x3f;
const int16_t INFS=0x3f3f;
const int32_t INF=0x3f3f3f3f;
const int64_t INFL=0x3f3f3f3f3f3f3f3fLL;
string solve()
{
    string s;
    cin >> s;
    int tries=5e3;
    while(tries--)
    {
        random_shuffle(s.begin(),s.end());
        bool flg=1;
        for (int i=0;i<s.size()&&flg;i++)
        {
            if (abs(s[i]-s[i-1])==1) flg=0;
        }
        if (flg) return s;
    }
    return "No answer";
}
int main()
{
    ios::sync_with_stdio(0);
    int T;
    cin >> T;
    while(T--)
    {
        cout <<solve() << endl;
    }
    return 0;
}
//


#include<bits/stdc++.h>

using namespace std;

#define REP(i,x,y) for (int i=x;i<y;i++)

const int8_t INFC=0x3f;
const int16_t INFS=0x3f3f;
const int32_t INF=0x3f3f3f3f;
const int64_t INFL=0x3f3f3f3f3f3f3f3fLL;
string solve()
{
    string s;
    cin >> s;
    int tries=5e3;
    while(tries--)
    {
        random_shuffle(s.begin(),s.end());
        bool flg=1;
        for (int i=0;i<s.size()&&flg;i++)
        {
            if (abs(s[i]-s[i-1])==1) flg=0;
        }
        if (flg) return s;
    }
    return "No answer";
}
int main()
{
    ios::sync_with_stdio(0);
    int T;
    cin >> T;
    while(T--)
    {
        cout <<solve() << endl;
    }
    return 0;
}


#include<bits/stdc++.h>

using namespace std;

#define REP(i,x,y) for (int i=x;i<y;i++)

const int8_t INFC=0x3f;
const int16_t INFS=0x3f3f;
const int32_t INF=0x3f3f3f3f;
const int64_t INFL=0x3f3f3f3f3f3f3f3fLL;
string solve()
{
    string s;
    cin >> s;
    int cnt[256];
    for (int i=0;i<s.size();i++)
    {
        cnt[s[i]]=1;
    }
    for (int i='a';i<='z';i++)
    {
        if (s[i-2]==0&&s[i-1]==1&&s[i]==1&&s[i+1]==1&&s[i+2]==0)
        {
            return "No answer";
        }
    }
    int tries=1.1e4;
    while(tries--)
    {
        random_shuffle(s.begin(),s.end());
        bool flg=1;
        for (int i=0;i<s.size()&&flg;i++)
        {
            if (abs(s[i]-s[i-1])==1) flg=0;
        }
        if (flg) return s;
    }
    return "No answer";
}
int main()
{
    ios::sync_with_stdio(0);
    int T;
    cin >> T;
    while(T--)
    {
        cout <<solve() << endl;
    }
    return 0;
}
//
//


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

int main()
{
    int t;
    string s;
    cin >> t;
    while(t--){
        cin >> s;

        int ara[26] = {0};
        for(int i = 0; i < s.size(); ++i){
            ara[s[i] - 'a']++;
        }//cout << ara[0] << endl;

        vector <int> v;
        string ans = ""; //cout << ans.size() << " ok " << endl;
        for(int i = 0; i < 26; i++){
            if(ara[i] && (i % 2) == 0){
                for(int j = 0; j < ara[i]; ++j){
                    ans += (i+'a');
                }
                ara[i] = 0;
            }
            else if(ara[i] && i % 2){
                v.push_back(i);
            }
        }// cout << ans << endl;
vector <int> store = v;
        if(ans.size() == 0 || v.size() == 0){
            cout << s << endl;
        }
        else{
                bool flag = true; int rem = 0, k = -1;
           while(rem <= v.size()){
            for( ++k; k < v.size(); ++k){
                int temp = ara[v[k]];
                char ch = v[k] + 'a';// cout << ch << endl;
                 //flag = true;
                 string:: iterator it = ans.begin();
                 if(v[k] != 25)
                for(int i = 0; i < ans.size(); ++i){
                    if(i == 0){
                        if(ch + 1 != ans[0] && ch - 1 != ans[0]){
                            ans.insert(it , 1, ch); rem = 0;
                            ara[v[k]]--;
                            v[k] = 25;
                            flag = false;
                        }
                        break;
                    }
                    else if(i == ans.size() - 1){
                        if(ch + 1 != ans[i] && ch -1 != ans[i]){
                            ans.insert(it, i+1, ch); rem  = 0;
                            ara[v[k]]--;
                            v[k] = 25;
                            flag = false;
                            break;
                        }
                    }
                    else if(ch+1 != ans[i-1] && ch-1 != ans[i-1] && ch+1 != ans[i+1] && ch-1 != ans[i+1]){
                        ans.insert(it, i+1, ch);  rem = 0;
                        ara[v[k]]--;
                        v[k] = 25;
                        flag = false;
                        break;
                    }
                }  //cout << ans << "ok " << endl;
            }
            if(k == v.size()){
                    k = -1;
                    rem++;
                }
        }

        bool check = false;
        for(int i = 0; i < v.size(); ++i){
            if(v[i] != 25){
                cout << "No answer\n";
                check = true;
                break;
            }
        }
         if(!check){
        for(int i = 0; i < v.size(); ++i){
            int temp = ara[store[i]];
            char ch = store[i] + 'a';
            string:: iterator it = ans.begin();
            for(int j = 0; j < ans.size(); ++j){
                if(ans[j] == ch){
                    for(int k = 0; k < ara[store[i]]; ++k){
                        ans.insert(it, j+1, ch);
                    }
                    break;
                }
            }

        }
            cout << ans << endl;
        }
        }
    }
    return 0;
}


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

int main()
{
    //freopen("in.txt", "r", stdin);
    int t;
    string s;
    cin >> t;
    while(t--){
        cin >> s;

        int ara[26] = {0};
        for(int i = 0; i < s.size(); ++i){
            ara[s[i] - 'a']++;
        }//cout << ara[0] << endl;

        vector <int> v;
        string ans = ""; //cout << ans.size() << " ok " << endl;
        for(int i = 0; i < 26; i++){
            if(ara[i] && (i % 2) == 0){
                for(int j = 0; j < ara[i]; ++j){
                    ans += (i+'a');
                }
                ara[i] = 0;
            }
            else if(ara[i] && i % 2){
                v.push_back(i);
            }
        } //cout << "it is " << ans << endl;
vector <int> store = v;
        if(ans.size() == 0 || v.size() == 0){
            cout << s << endl;
        }
        else{
                bool flag = true; int rem = 0, k = -1;
           while(rem <= v.size()){
            for( ++k; k < v.size(); ++k){ //cout << k << " in " << ans << endl;
                int temp = ara[v[k]];
                char ch = v[k] + 'a'; //cout << k << " ch is " << ch << endl;
                 //flag = true;
                 string:: iterator it = ans.begin();
                 if(v[k] != 25){
                for(int i = 0; i < ans.size(); ++i){
                    if(i == 0){
                        if(ch + 1 != ans[0] && ch - 1 != ans[0]){
                            ans.insert(it , ch); rem = 0;
                            ara[v[k]]--;
                            v[k] = 25;
                            flag = false;
                            break;
                        }
                    }
                    else if(i == ans.size() - 1){ //cout << "ok ok\n";
                        if(ch + 1 != ans[i] && ch -1 != ans[i]){ //cout << "i si " << i << endl;
                            ans.insert(it +i +1, ch); rem  = 0; //cout << "ok  " <<  ans << endl;
                            ara[v[k]]--;
                            v[k] = 25;
                            flag = false;
                            break;
                        }
                    }
                    else if(ch+1 != ans[i-1] && ch-1 != ans[i-1] && ch+1 != ans[i+1] && ch-1 != ans[i+1]){
                        ans.insert(it +i+1, ch);  rem = 0;
                        ara[v[k]]--;
                        v[k] = 25;
                        flag = false;
                        break;
                    }
                }  //cout << ans << "ok " << endl;
            }
            }
            if(k == v.size()){
                    k = -1;
                    rem++;
                }
        }
//cout << "Debug is " << ans << endl;
        bool check = false;
        for(int i = 0; i < v.size(); ++i){
            if(v[i] != 25){
                cout << "No answer\n";
                check = true;
                break;
            }
        }
         if(!check){
        for(int i = 0; i < store.size(); ++i){
            int temp = ara[store[i]];
            char ch = store[i] + 'a';
            string:: iterator it = ans.begin();
            for(int j = 0; j < ans.size(); ++j){
                if(ans[j] == ch){
                    for(int k = 0; k < ara[store[i]]; ++k){
                        ans.insert(it, j+1, ch);
                    }
                    break;
                }
            }

        }
            cout << ans << endl;
        }
        }
    }
    return 0;
}


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

int main()
{
    //freopen("in.txt", "r", stdin);
    int t;
    string s;
    cin >> t;
    while(t--){
        cin >> s;

        int ara[26] = {0};
        for(int i = 0; i < s.size(); ++i){
            ara[s[i] - 'a']++;
        }//cout << ara[0] << endl;

        vector <int> v;
        string ans = ""; //cout << ans.size() << " ok " << endl;
        for(int i = 0; i < 26; i++){
            if(ara[i] && (i % 2) == 0){
                for(int j = 0; j < ara[i]; ++j){
                    ans += (i+'a');
                }
                ara[i] = 0;
            }
            else if(ara[i] && i % 2){
                v.push_back(i);
            }
        } //cout << "it is " << ans << endl;
vector <int> store = v;
        if(ans.size() == 0 || v.size() == 0){
            cout << s << endl;
        }
        else{
                bool flag = true; int rem = 0, k = -1;
           while(rem <= v.size()){
            for( ++k; k < v.size(); ++k){ //cout << k << " in " << ans << endl;
                //int temp = ara[v[k]];
                //if(v[k] != -1)
                char ch;
                if(v[k] != -1)ch = v[k] + 'a'; //cout << k << " ch is " << ch << endl;
                 //flag = true;
                 string:: iterator it = ans.begin();
                 if(v[k] != -1){
                for(int i = 0; i < ans.size(); ++i){
                    if(i == 0){
                        if(ch + 1 != ans[0] && ch - 1 != ans[0]){
                            ans.insert(it , ch); rem = 0; //cout << "i " << ans << endl;
                            ara[v[k]]--;
                            v[k] = -1;
                            flag = false;
                            break;
                        }
                    }
                    else if(i == ans.size() - 1){ //cout << "ok ok\n";
                        if(ch + 1 != ans[i] && ch - 1 != ans[i]){ //cout << "i si " << i << endl;
                            ans.insert(it +i +1, ch); rem  = 0; //cout << "ok  " <<  ans << endl;
                            ara[v[k]]--;
                            v[k] = -1;
                            flag = false;
                            break;
                        }
                    }
                    else if(ch+1 != ans[i-1] && ch-1 != ans[i-1] && ch+1 != ans[i] && ch-1 != ans[i]){
                        ans.insert(it +i+1, ch);  rem = 0;
                        ara[v[k]]--;
                        v[k] = -1;
                        flag = false;
                        break;
                    }
                }  //cout << ans << "ok " << endl;
            }
            }
            if(k == v.size()){
                    k = -1;
                    rem++;
                }
        }
//cout << "Debug is " << ans << endl;
        bool check = false;
        for(int i = 0; i < v.size(); ++i){
            if(v[i] != -1){
                cout << "No answer\n";
                check = true;
                break;
            }
        } //cout << "ara " << ara[3] << endl;
         if(!check){
        for(int i = 0; i < store.size(); ++i){
            char ch = store[i] + 'a';
            string:: iterator it = ans.begin();
            for(int j = 0; j < ans.size(); ++j){
                if(ans[j] == ch){
                    for(int k = 0; k < ara[store[i]]; ++k){//cout << k << endl;
                        ans.insert(it+ j+1, ch); //cout << ans << endl;
                        it = ans.begin(); ///This is very important
                    }
                    break;
                }
            }

        }
            cout << ans << endl;
        }
        }
    }
    return 0;
}


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

int main()
{
    //freopen("in.txt", "r", stdin);
    int t;
    string s;
    cin >> t;
    while(t--){
        cin >> s;

        int ara[26] = {0};
        for(int i = 0; i < s.size(); ++i){
            ara[s[i] - 'a']++;
        }//cout << ara[0] << endl;

        vector <int> v;
        string ans = ""; //cout << ans.size() << " ok " << endl;
        for(int i = 0; i < 26; i++){
            if(ara[i] && (i % 2) == 0){
                for(int j = 0; j < ara[i]; ++j){
                    ans += (i+'a');
                }
                ara[i] = 0;
            }
            else if(ara[i] && i % 2){
                v.push_back(i);
            }
        } //cout << "it is " << ans << endl;
vector <int> store = v;
        if(ans.size() == 0 || v.size() == 0){
            cout << s << endl;
        }
        else{
                bool flag = true; int rem = 0, k = -1;
           while(rem <= v.size()){
            for( ++k; k < v.size(); ++k){ //cout << k << " in " << ans << endl;
                int temp = ara[v[k]];
                char ch = v[k] + 'a'; //cout << k << " ch is " << ch << endl;
                 //flag = true;
                 string:: iterator it = ans.begin();
                 if(v[k] != 25){
                for(int i = 0; i < ans.size(); ++i){
                    if(i == 0){
                        if(ch + 1 != ans[0] && ch - 1 != ans[0]){
                            ans.insert(it +1 , ch); rem = 0;
                            ara[v[k]]--;
                            v[k] = 25;
                            flag = false;
                            break;
                        }
                    }
                    else if(i == ans.size() - 1){ //cout << "ok ok\n";
                        if(ch + 1 != ans[i] && ch -1 != ans[i]){ //cout << "i si " << i << endl;
                            ans.insert(it +i +1, ch); rem  = 0; //cout << "ok  " <<  ans << endl;
                            ara[v[k]]--;
                            v[k] = 25;
                            flag = false;
                            break;
                        }
                    }
                    else if(ch+1 != ans[i-1] && ch-1 != ans[i-1] && ch+1 != ans[i+1] && ch-1 != ans[i+1]){
                        ans.insert(it +i+1, ch);  rem = 0;
                        ara[v[k]]--;
                        v[k] = 25;
                        flag = false;
                        break;
                    }
                }  //cout << ans << "ok " << endl;
            }
            }
            if(k == v.size()){
                    k = -1;
                    rem++;
                }
        }
//cout << "Debug is " << ans << endl;
        bool check = false;
        for(int i = 0; i < v.size(); ++i){
            if(v[i] != 25){
                cout << "No answer\n";
                check = true;
                break;
            }
        }
         if(!check){
        for(int i = 0; i < store.size(); ++i){
            int temp = ara[store[i]];
            char ch = store[i] + 'a';
            string:: iterator it = ans.begin();
            for(int j = 0; j < ans.size(); ++j){
                if(ans[j] == ch){
                    for(int k = 0; k < ara[store[i]]; ++k){
                        ans.insert(it, j+1, ch);
                    }
                    break;
                }
            }

        }
            cout << ans << endl;
        }
        }
    }
    return 0;
}


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

int main()
{
    freopen("in.txt", "r", stdin);
    int t;
    string s;
    cin >> t;
    while(t--){
        cin >> s;

        int ara[26] = {0};
        for(int i = 0; i < s.size(); ++i){
            ara[s[i] - 'a']++;
        }//cout << ara[0] << endl;

        vector <int> v;
        string ans = ""; //cout << ans.size() << " ok " << endl;
        for(int i = 0; i < 26; i++){
            if(ara[i] && (i % 2) == 0){
                for(int j = 0; j < ara[i]; ++j){
                    ans += (i+'a');
                }
                ara[i] = 0;
            }
            else if(ara[i] && i % 2){
                v.push_back(i);
            }
        } //cout << "it is " << ans << endl;
vector <int> store = v;
        if(ans.size() == 0 || v.size() == 0){
            cout << s << endl;
        }
        else{
                bool flag = true; int rem = 0, k = -1;
           while(rem <= v.size()){
            for( ++k; k < v.size(); ++k){ //cout << k << " in " << ans << endl;
                //int temp = ara[v[k]];
                //if(v[k] != -1)
                char ch;
                if(v[k] != -1)ch = v[k] + 'a'; //cout << k << " ch is " << ch << endl;
                 //flag = true;
                 string:: iterator it = ans.begin();
                 if(v[k] != -1){
                for(int i = 0; i < ans.size(); ++i){
                    if(i == 0){
                        if(ch + 1 != ans[0] && ch - 1 != ans[0]){
                            ans.insert(it , ch); rem = 0; //cout << "i " << ans << endl;
                            ara[v[k]]--;
                            v[k] = -1;
                            flag = false;
                            break;
                        }
                    }
                    else if(i == ans.size() - 1){ //cout << "ok ok\n";
                        if(ch + 1 != ans[i] && ch - 1 != ans[i]){ //cout << "i si " << i << endl;
                            ans.insert(it +i +1, ch); rem  = 0; //cout << "ok  " <<  ans << endl;
                            ara[v[k]]--;
                            v[k] = -1;
                            flag = false;
                            break;
                        }
                    }
                    else if(ch+1 != ans[i-1] && ch-1 != ans[i-1] && ch+1 != ans[i+1] && ch-1 != ans[i+1]){
                        ans.insert(it +i+1, ch);  rem = 0;
                        ara[v[k]]--;
                        v[k] = -1;
                        flag = false;
                        break;
                    }
                }  //cout << ans << "ok " << endl;
            }
            }
            if(k == v.size()){
                    k = -1;
                    rem++;
                }
        }
//cout << "Debug is " << ans << endl;
        bool check = false;
        for(int i = 0; i < v.size(); ++i){
            if(v[i] != -1){
                cout << "No answer\n";
                check = true;
                break;
            }
        } //cout << "ara " << ara[3] << endl;
         if(!check){
        for(int i = 0; i < store.size(); ++i){
            char ch = store[i] + 'a';
            string:: iterator it = ans.begin();
            for(int j = 0; j < ans.size(); ++j){
                if(ans[j] == ch){
                    for(int k = 0; k < ara[store[i]]; ++k){//cout << k << endl;
                        ans.insert(it+ j+1, ch); //cout << ans << endl;
                        it = ans.begin(); ///This is very important
                    }
                    break;
                }
            }

        }
            cout << ans << endl;
        }
        }
    }
    return 0;
}


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

int main()
{
    //freopen("in.txt", "r", stdin);
    int t;
    string s;
    cin >> t;
    while(t--){
        cin >> s;

        int ara[26] = {0};
        for(int i = 0; i < s.size(); ++i){
            ara[s[i] - 'a']++;
        }//cout << ara[0] << endl;

        vector <int> v;
        string ans = ""; //cout << ans.size() << " ok " << endl;
        for(int i = 0; i < 26; i++){
            if(ara[i] && (i % 2) == 0){
                for(int j = 0; j < ara[i]; ++j){
                    ans += (i+'a');
                }
                ara[i] = 0;
            }
            else if(ara[i] && i % 2){
                v.push_back(i);
            }
        } //cout << "it is " << ans << endl;
vector <int> store = v;
        if(ans.size() == 0 || v.size() == 0){
            cout << s << endl;
        }
        else{
                bool flag = true; int rem = 0, k = -1;
           while(rem <= v.size()){
            for( ++k; k < v.size(); ++k){ //cout << k << " in " << ans << endl;
                int temp = ara[v[k]];
                char ch = v[k] + 'a'; //cout << k << " ch is " << ch << endl;
                 //flag = true;
                 string:: iterator it = ans.begin();
                 if(v[k] != 25){
                for(int i = 0; i < ans.size(); ++i){
                    if(i == 0){
                        if(ch + 1 != ans[0] && ch - 1 != ans[0]){
                            ans.insert(it , ch); rem = 0;
                            ara[v[k]]--;
                            v[k] = 25;
                            flag = false;
                            break;
                        }
                    }
                    else if(i == ans.size() - 1){ //cout << "ok ok\n";
                        if(ch + 1 != ans[i] && ch -1 != ans[i]){ //cout << "i si " << i << endl;
                            ans.insert(it +i +1, ch); rem  = 0; //cout << "ok  " <<  ans << endl;
                            ara[v[k]]--;
                            v[k] = 25;
                            flag = false;
                            break;
                        }
                    }
                    else if(ch+1 != ans[i-1] && ch-1 != ans[i-1] && ch+1 != ans[i+1] && ch-1 != ans[i+1]){
                        ans.insert(it +i+1, ch);  rem = 0;
                        ara[v[k]]--;
                        v[k] = 25;
                        flag = false;
                        break;
                    }
                }  //cout << ans << "ok " << endl;
            }
            }
            if(k == v.size()){
                    k = -1;
                    rem++;
                }
        }
//cout << "Debug is " << ans << endl;
        bool check = false;
        for(int i = 0; i < v.size(); ++i){
            if(v[i] != 25){
                cout << "No answer\n";
                check = true;
                break;
            }
        } //cout << "ara " << ara[3] << endl;
         if(!check){
        for(int i = 0; i < store.size(); ++i){
            int temp = ara[store[i]];
            char ch = store[i] + 'a';
            string:: iterator it = ans.begin();
            for(int j = 0; j < ans.size(); ++j){
                if(ans[j] == ch){
                    for(int k = 0; k < ara[store[i]]; ++k){
                        ans.insert(it+ j+1, ch);
                    }
                    break;
                }
            }

        }
            cout << ans << endl;
        }
        }
    }
    return 0;
}


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

int main()
{
    //freopen("in.txt", "r", stdin);
    int t;
    string s;
    cin >> t;
    while(t--){
        cin >> s;

        int ara[26] = {0};
        for(int i = 0; i < s.size(); ++i){
            ara[s[i] - 'a']++;
        }//cout << ara[0] << endl;

        vector <int> v;
        string ans = ""; //cout << ans.size() << " ok " << endl;
        for(int i = 0; i < 26; i++){
            if(ara[i] && (i % 2) == 0){
                for(int j = 0; j < ara[i]; ++j){
                    ans += (i+'a');
                }
                ara[i] = 0;
            }
            else if(ara[i] && i % 2){
                v.push_back(i);
            }
        } //cout << "it is " << ans << endl;
vector <int> store = v;
        if(ans.size() == 0 || v.size() == 0){
            cout << s << endl;
        }
        else{
                bool flag = true; int rem = 0, k = -1;
           while(rem <= v.size()){
            for( ++k; k < v.size(); ++k){ //cout << k << " in " << ans << endl;
                //int temp = ara[v[k]];
                //if(v[k] != -1)
                char ch;
                if(v[k] != -1)ch = v[k] + 'a'; //cout << k << " ch is " << ch << endl;
                 //flag = true;
                 string:: iterator it = ans.begin();
                 if(v[k] != -1){
                for(int i = 0; i < ans.size(); ++i){
                    if(i == 0){
                        if(ch + 1 != ans[0] && ch - 1 != ans[0]){
                            ans.insert(it , ch); rem = 0; //cout << "i " << ans << endl;
                            ara[v[k]]--;
                            v[k] = -1;
                            flag = false;
                            break;
                        }
                    }
                    else if(i == ans.size() - 1){ //cout << "ok ok\n";
                        if(ch + 1 != ans[i] && ch - 1 != ans[i]){ //cout << "i si " << i << endl;
                            ans.insert(it +i +1, ch); rem  = 0; //cout << "ok  " <<  ans << endl;
                            ara[v[k]]--;
                            v[k] = -1;
                            flag = false;
                            break;
                        }
                    }
                    else if(ch+1 != ans[i-1] && ch-1 != ans[i-1] && ch+1 != ans[i+1] && ch-1 != ans[i+1]){
                        ans.insert(it +i+1, ch);  rem = 0;
                        ara[v[k]]--;
                        v[k] = -1;
                        flag = false;
                        break;
                    }
                }  //cout << ans << "ok " << endl;
            }
            }
            if(k == v.size()){
                    k = -1;
                    rem++;
                }
        }
//cout << "Debug is " << ans << endl;
        bool check = false;
        for(int i = 0; i < v.size(); ++i){
            if(v[i] != -1){
                cout << "No answer\n";
                check = true;
                break;
            }
        } //cout << "ara " << ara[3] << endl;
         if(!check){
        for(int i = 0; i < store.size(); ++i){
            char ch = store[i] + 'a';
            string:: iterator it = ans.begin();
            for(int j = 0; j < ans.size(); ++j){
                if(ans[j] == ch){
                    for(int k = 0; k < ara[store[i]]; ++k){//cout << k << endl;
                        ans.insert(it+ j+1, ch); //cout << ans << endl;
                        it = ans.begin(); ///This is very important
                    }
                    break;
                }
            }

        }
            cout << ans << endl;
        }
        }
    }
    return 0;
}


/*
* @Author: XiaoBanni
* @Email:  xjc5069@gmail.com
* @Date:   2019-05-01 23:53:56
* @Last Modified by:   Y
* @Last Modified time: 2019-05-01 23:53:56
*/

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pint;
typedef pair<ll,ll> pll;
typedef priority_queue<int> maxpque;
typedef priority_queue<int,vector<int>,greater<int> > minpque;
const int MAXN = 1e5+5;
const int INF=INT_MAX/2;
const ll LLINF=9223372036854775807/2;
#define in(a) scanf("%d",&a)
#define inll(a) scanf("%lld",&a)
#define out(a) printf("%d",a)
#define outll(a) printf("%lld",a)
#define outln(a) printf("%d\n",a)
#define outllln(a) printf("%lld\n",a)
#define fin(i,st,n) for(int i=st;i<n;i++)
#define fin2(i,st,n) for(int i=st;i<=n;i++)
#define mk make_pair
#define maxpque(type) priority_queue<type>
#define minpque(type) priority_queue<type,vector<type>,greater<type> > //pay attention that no ',' in type
#define gcd __gcd
#define IOS ios::sync_with_stdio(false);cin.tie(0); cout.tie(0);

int alp[30];

int main(){
	int t;
	in(t);
	while(t--){
		int cnt=0;
		memset(alp,0,sizeof(alp));
		string s;
		cin>>s;
		int n=s.size();
		for(int i=0;i<n;i++){
			alp[s[i]-'a'+1]++;
		}

		fin2(i,1,26){
			if(alp[i]) cnt++;
		}

		if(cnt>=4||cnt==1){
			int f=1;
			for(int i=1;i<=26;i++){
				if(alp[i]&&f%2==0){
					fin2(j,1,alp[i]) printf("%c",'a'+i-1);
				}
				if(alp[i]) f++;
			}
			f=1;
			for(int i=1;i<=26;i++){
				if(alp[i]&&f%2==1){
					fin2(j,1,alp[i]) printf("%c",'a'+i-1);
				}
				if(alp[i]) f++;
			}
			printf("\n");
		}

		else if(cnt==2){
			int pos1=0,pos2=0;
			fin2(i,1,26){
				if(alp[i]&&!pos1) pos1=i;
				if(alp[i]&&pos1) pos2=i;
			}
			if(pos2-pos1==1){
				 printf("No answer");
			}
			else{
				fin2(j,1,alp[pos1]) printf("%c",'a'+pos1-1);
				fin2(j,1,alp[pos2]) printf("%c",'a'+pos2-1);
			}
			printf("\n");
		}

		else if(cnt==3){
			int pos1=0,pos2=0,pos3=0;
			fin2(i,1,26){
				if(alp[i]&&!pos1) pos1=i;
				else if(alp[i]&&!pos2) pos2=i;
				else if(alp[i]&&!pos3) pos3=i;
			}
			if(pos3-pos2==1&&pos2-pos1==1){
				printf("No answer");
			}
			else{
				if(pos3-pos2!=1){
					fin2(j,1,alp[pos1]) printf("%c",'a'+pos1-1);
					fin2(j,1,alp[pos3]) printf("%c",'a'+pos3-1);
					fin2(j,1,alp[pos2]) printf("%c",'a'+pos2-1);
				}
				else if(pos2-pos1!=1){
					fin2(j,1,alp[pos2]) printf("%c",'a'+pos2-1);
					fin2(j,1,alp[pos1]) printf("%c",'a'+pos1-1);
					fin2(j,1,alp[pos3]) printf("%c",'a'+pos3-1);
				}
			}
			printf("\n");
		}
	}
	return 0;
}


/*
* @Author: XiaoBanni
* @Email:  xjc5069@gmail.com
* @Date:   2019-05-01 23:53:56
* @Last Modified by:   Y
* @Last Modified time: 2019-05-01 23:53:56
*/

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pint;
typedef pair<ll,ll> pll;
typedef priority_queue<int> maxpque;
typedef priority_queue<int,vector<int>,greater<int> > minpque;
const int MAXN = 1e5+5;
const int INF=INT_MAX/2;
const ll LLINF=9223372036854775807/2;
#define in(a) scanf("%d",&a)
#define inll(a) scanf("%lld",&a)
#define out(a) printf("%d",a)
#define outll(a) printf("%lld",a)
#define outln(a) printf("%d\n",a)
#define outllln(a) printf("%lld\n",a)
#define fin(i,st,n) for(int i=st;i<n;i++)
#define fin2(i,st,n) for(int i=st;i<=n;i++)
#define mk make_pair
#define maxpque(type) priority_queue<type>
#define minpque(type) priority_queue<type,vector<type>,greater<type> > //pay attention that no ',' in type
#define gcd __gcd
#define IOS ios::sync_with_stdio(false);cin.tie(0); cout.tie(0);

int alp[30];

int main(){
	int t;
	in(t);
	while(t--){
		int cnt=0;
		memset(alp,0,sizeof(alp));
		string s;
		cin>>s;
		int n=s.size();
		for(int i=0;i<n;i++){
			alp[s[i]-'a'+1]++;
		}

		fin2(i,1,26){
			if(alp[i]) cnt++;
		}

		if(cnt>=4||cnt==1){
			for(int i=1;i<=26;i+=2){
				if(alp[i]){
					fin2(j,1,alp[i]) printf("%c",'a'+i-1);
				}
			}
			for(int i=2;i<=26;i+=2){
				if(alp[i]){
					fin2(j,1,alp[i]) printf("%c",'a'+i-1);
				}
			}
			printf("\n");
		}

		else if(cnt==2){
			int pos1=0,pos2=0;
			fin2(i,1,26){
				if(alp[i]&&!pos1) pos1=i;
				if(alp[i]&&pos1) pos2=i;
			}
			if(pos2-pos1==1){
				 printf("No answer\n");
			}
			else{
				fin2(j,1,alp[pos1]) printf("%c",'a'+pos1-1);
				fin2(j,1,alp[pos2]) printf("%c",'a'+pos2-1);
			}
			printf("\n");
		}

		else if(cnt==3){
			int pos1=0,pos2=0,pos3=0;
			fin2(i,1,26){
				if(alp[i]&&!pos1) pos1=i;
				else if(alp[i]&&!pos2) pos2=i;
				else if(alp[i]&&!pos3) { pos3=i;
				}
			}
			if(pos3-pos2==1&&pos2-pos1==1){
				printf("No answer\n");
			}
			else{
				fin2(j,1,alp[pos1]) printf("%c",'a'+pos1-1);
				fin2(j,1,alp[pos3]) printf("%c",'a'+pos3-1);
				fin2(j,1,alp[pos2]) printf("%c",'a'+pos2-1);
			}
			printf("\n");
		}

	}
	return 0;
}