#include <bits/stdc++.h>
using namespace std;
void flags() {
  srand(time(0));
  ios::sync_with_stdio(0);
  cin.tie();
  cout.tie();
  cout.setf(ios::fixed, ios::floatfield);
  cout.precision(16);
  cerr.tie();
  cerr.setf(ios::fixed, ios::floatfield);
  cerr.precision(4);
  return;
}
void solution() {
  long long t = 0;
  cin >> t;
  for (long long tt = 0; tt < t; tt++) {
    string s;
    cin >> s;
    s += "#";
    long long c = 1;
    vector<long long> a(26, 0);
    for (long long i = 1; i < s.size(); i++) {
      if (s[i] == s[i - 1]) {
        c++;
      } else {
        if (c % 2 != 0) {
          a[s[i - 1] - 'a'] = 1;
        }
        c = 1;
      }
    }
    for (long long i = 0; i < 26; i++) {
      if (a[i] == 1) {
        cout << char(i + 'a');
      }
    }
    cout << endl;
  }
  return;
}
signed main() {
  flags();
  solution();
  return 0;
}
