#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int T;
  cin >> T;
  for (int k = 0; k < T; k++) {
    string s;
    cin >> s;
    vector<int> letters(26, 0);
    for (auto& i : s) {
      letters[i - 'a']++;
    }
    vector<int> used;
    int c = 0;
    for (int i = 0; i < 26; i++) {
      if (letters[i]) {
        c++;
        used.push_back(i);
      }
    }
    if (c == 1) {
      cout << s << "\n";
    } else if (c == 2) {
      for (int i = 0; i < 26; i++) {
        if (letters[i]) {
          if (letters[i + 1]) {
            cout << "No answer\n";
          } else {
            for (int j = 0; j < letters[i]; j++) {
              cout << char('a' + i);
            }
            for (int j = 0; j < letters[used[1]]; j++) {
              cout << char('a' + used[1]);
            }
            cout << "\n";
          }
          break;
        }
      }
    } else if (c >= 5) {
      for (int i = 0; i < c; i += 2) {
        for (int j = 0; j < letters[used[i]]; j++) {
          cout << char('a' + used[i]);
        }
      }
      for (int i = 1; i < c; i += 2) {
        for (int j = 0; j < letters[used[i]]; j++) {
          cout << char('a' + used[i]);
        }
      }
      cout << "\n";
    } else if (c == 3) {
      for (int i = 0; i < 26; i++) {
        if (letters[i]) {
          if (letters[i + 1] && letters[i + 2]) {
            cout << "No answer\n";
          } else {
            if (letters[i + 1]) {
              for (int j = 0; j < letters[used[0]]; j++) {
                cout << char('a' + used[0]);
              }
              for (int j = 0; j < letters[used[2]]; j++) {
                cout << char('a' + used[2]);
              }
              for (int j = 0; j < letters[used[1]]; j++) {
                cout << char('a' + used[1]);
              }
              cout << "\n";
            } else {
              for (int j = 0; j < letters[used[1]]; j++) {
                cout << char('a' + used[1]);
              }
              for (int j = 0; j < letters[used[0]]; j++) {
                cout << char('a' + used[0]);
              }
              for (int j = 0; j < letters[used[2]]; j++) {
                cout << char('a' + used[2]);
              }
              cout << "\n";
            }
          }
          break;
        }
      }
    } else if (c == 4) {
      for (int j = 0; j < letters[used[2]]; j++) {
        cout << char('a' + used[2]);
      }
      for (int j = 0; j < letters[used[0]]; j++) {
        cout << char('a' + used[0]);
      }
      for (int j = 0; j < letters[used[3]]; j++) {
        cout << char('a' + used[3]);
      }
      for (int j = 0; j < letters[used[1]]; j++) {
        cout << char('a' + used[1]);
      }
      cout << "\n";
    }
  }
  return 0;
}
