#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    string s;
    cin >> s;
    bool fre[26] = {false};
    for (int i = 0; i < s.length(); i++) {
      int j = i;
      while (s[j + 1] == s[i] && j + 1 != s.length()) {
        j++;
      }
      if ((j - i) % 2 == 0) fre[s[i] - 'a'] = true;
      i = j;
    }
    for (int i = 0; i < 26; i++) {
      if (fre[i] == true) cout << char('a' + i);
    }
    cout << endl;
  }
}
