#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int a[30];
    memset(a, 0, sizeof(a));
    string s;
    cin >> s;
    int len = s.size();
    if (len == 1) {
      cout << s << endl;
      continue;
    }
    for (int i = 0; i < len; i++) {
      if (s[i] != s[i + 1]) {
        a[s[i] - 'a'] = 1;
      } else {
        i++;
      }
    }
    for (int i = 0; i < 26; i++) {
      if (a[i] == 1) {
        printf("%c", i + 'a');
      }
    }
    cout << endl;
  }
  return 0;
}
