#include <bits/stdc++.h>
using namespace std;
long long power(long long x, long long y) {
  long long res = 1;
  while (y > 0) {
    if (y % 2 == 1) res *= x;
    y /= 2;
    x *= x;
  }
  return res;
}
int main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(0);
  ;
  long long test;
  cin >> test;
  while (test--) {
    string s;
    cin >> s;
    char ch = s[0];
    long long count = 0;
    set<int> v;
    for (long long i = 0; i < s.length(); i++) {
      if (s[i] == ch)
        count++;
      else {
        if (count % 2 == 1) {
          v.insert(ch - 'a');
        }
        ch = s[i];
        count = 1;
      }
    }
    if (count % 2 == 1) {
      v.insert(ch - 'a');
      count = 0;
    }
    for (auto x : v) {
      cout << char(x + 'a');
    }
    cout << endl;
    ;
  }
}
