#include <bits/stdc++.h>
const int MAX = 1e6 + 5;
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t = 1;
  cin >> t;
  while (t--) {
    string s;
    cin >> s;
    int n = s.length();
    string res = "";
    if (s.length() == 1) {
      cout << s << endl;
    } else {
      map<char, int> mp;
      for (int i = 0; i < n; i++) {
        int j = i;
        while (j + 1 < n && s[j + 1] == s[i]) j++;
        if ((j - i) % 2 == 0) mp[s[i]] = 1;
        i = j;
      }
      for (int i = 'a'; i <= 'z'; i++) {
        if (mp[i]) res += i;
      }
      cout << res << endl;
    }
  }
  return 0;
}
