#include <bits/stdc++.h>
using namespace std;
int prime[1000006];
int sieve[1000006];
int pLength;
const long long mod = 1000000007;
int main() {
  ios_base::sync_with_stdio;
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    string s;
    cin >> s;
    set<char> second;
    set<char>::iterator it;
    int a[27];
    for (int i = 0; i < 27; i++) {
      a[i] = 0;
    }
    if (s.size() == 1) {
      cout << s[0] << '\n';
      continue;
    }
    for (int i = 0; i < s.size(); i++) {
      a[s[i] - 96]++;
    }
    for (int i = 0; i < 27; i++) {
      if (a[i] % 2 != 0) {
        second.insert(char(i + 96));
      } else if (a[i] != 0) {
        bool f = false;
        int j = 0;
        for (; j < s.size();) {
          if (j == s.size() - 1) {
            if (s[j] == char(i)) {
              f = true;
            }
            break;
          } else if (s[j] == char(i + 96) && s[j + 1] != char(i + 96)) {
            f = true;
            break;
          } else if (s[j] == char(i + 96) && s[j + 1] == char(i + 96)) {
            j += 2;
          } else {
            j++;
          }
        }
        if (f) {
          second.insert(char(i + 96));
        }
      }
    }
    for (it = second.begin(); it != second.end(); it++) {
      cout << *it;
    }
    cout << '\n';
  }
}
