#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t, i, j;
  string s;
  set<char> res;
  cin >> t;
  while (t--) {
    res.clear();
    cin >> s;
    for (i = 0; i < s.size();) {
      j = i + 1;
      while (j < s.size() && s[j] == s[i]) j++;
      if ((j - i) % 2) res.insert(s[i]);
      i = j;
    }
    for (auto it = res.begin(); it != res.end(); it++) cout << *it;
    cout << '\n';
  }
}
