#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    string s;
    cin >> s;
    set<char> s1;
    int i, count = 0, x;
    for (i = 0; i < s.length(); i++) {
      count = 0;
      x = i;
      while (s[i] == s[i + 1] && i < s.length()) {
        count++;
        i++;
      }
      if (count % 2 == 0) {
        s1.insert(s[x]);
      }
    }
    for (auto a : s1) {
      cout << a;
    }
    cout << endl;
  }
}
