#include <bits/stdc++.h>
using namespace std;
const double PI = atan(1.0) * 4.0;
int main() {
  std::ios::sync_with_stdio(false);
  int k;
  cin >> k;
  while (k--) {
    int c[500];
    int n = 0;
    string s;
    memset(c, 0, sizeof(c));
    cin >> s;
    s += '1';
    int len = s.size();
    for (int i = 0; i < len - 1; i++) {
      if (s[i] == s[i + 1])
        i++;
      else
        c[s[i]] = 1;
    }
    for (int i = 1; i <= 200; i++) {
      if (c[i] == 1) cout << (char)i;
    }
    cout << endl;
  }
}
