#include <bits/stdc++.h>
using namespace std;
string s;
int m, n, t, a[1000], t2;
int main() {
  cin >> t2;
  while (t2--) {
    cin >> s;
    s += '+';
    for (int x = 0; x < s.size(); x++) {
      if (x == 0 || s[x] != s[x - 1]) {
        if (x != 0 && t % 2 == 1) {
          a[s[x - 1] - 'a'] = 1;
        }
        t = 1;
      } else {
        t++;
      }
    }
    string ss;
    for (int x = 0; x < 26; x++) {
      if (a[x] != 0) {
        ss += (char)(x + 'a');
      }
      a[x] = 0;
    }
    cout << ss << endl;
  }
}
