#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    string s;
    cin >> s;
    set<char> res;
    vector<char> ans;
    for (int i = 0; i < s.length(); i++) {
      if (s[i] == s[i + 1]) {
        i++;
      } else {
        char c = s[i];
        res.insert(c);
      }
    }
    for (auto i : res) cout << i;
    cout << "\n";
  }
}
