#include <bits/stdc++.h>
using namespace std;
bool com(long long a, long long b) { return a > b; }
int main() {
  long long t;
  cin >> t;
  while (t--) {
    string second;
    cin >> second;
    long long cnt = 1;
    set<char> s1;
    for (long long i = 0; i < second.size(); i++) {
      if (second[i] == second[i + 1] && (i + 1 < second.size()))
        cnt++;
      else {
        if (cnt % 2 != 0) s1.insert(second[i]);
        cnt = 1;
      }
    }
    for (auto i = s1.begin(); i != s1.end(); i++) {
      cout << *i;
    }
    cout << "\n";
  }
}
