#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t;
  cin >> t;
  while (t--) {
    string s;
    cin >> s;
    long long int i, c = 0;
    set<char> ch;
    for (char m = 'a'; m <= 'z'; m++) {
      c = 0;
      for (i = 0; i < s.length(); i++) {
        if (s[i] == m && s[i + 1] != m) {
          c++;
        } else if (s[i] == m && s[i + 1] == m) {
          i++;
        }
      }
      if (c != 0) ch.insert(m);
    }
    for (auto p = ch.begin(); p != ch.end(); p++) cout << *p;
    cout << endl;
  }
  return 0;
}
