#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    string s;
    cin >> s;
    int l = s.length();
    vector<int> v(26, 0);
    for (int i = 0; i < l; i++) {
      if (s[i] == s[i + 1]) {
        i++;
      } else {
        v[s[i] - 'a'] = 1;
      }
    }
    for (int i = 0; i < 26; i++) {
      if (v[i]) {
        cout << (char)(i + 'a');
      }
    }
    cout << endl;
  }
  return 0;
}
