#include <bits/stdc++.h>
using namespace std;
int t;
char a[30];
int main() {
  cin >> t;
  while (t--) {
    string s;
    cin >> s;
    int len = s.size(), id = 0;
    for (int i = 0; i < len; i++) {
      int temp = 1;
      while (s[i + 1] == s[i]) {
        i++;
        temp++;
      }
      if (temp % 2 == 0) continue;
      int flag = 0;
      for (int j = 0; j < id; j++) {
        if (a[j] == s[i]) {
          flag = 1;
          break;
        }
      }
      if (!flag) a[id++] = s[i];
    }
    if (!id)
      cout << endl;
    else {
      sort(a, a + id);
      for (int i = 0; i < id; i++) cout << a[i];
      cout << endl;
    }
  }
  return 0;
}
