#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    string str;
    cin >> str;
    bool freq[26];
    memset(freq, 0, sizeof(freq));
    for (int i = 0; i < str.size(); i++) {
      int j = i;
      int cnt = 0;
      while (j < str.size() && str[j] == str[i]) {
        cnt++;
        j++;
      }
      i = j - 1;
      if (cnt % 2) {
        freq[str[i] - 'a'] = 1;
      }
    }
    for (int i = 0; i < 26; i++) {
      if (freq[i]) {
        cout << (char)(i + 'a');
      }
    }
    cout << endl;
  }
  return 0;
}
