#include <bits/stdc++.h>
using namespace std;
int n;
string s;
set<char> correct;
int main() {
  scanf("%d", &n);
  while (n--) {
    cin >> s;
    for (int i = 0; i < s.size(); i++) {
      int r = 1;
      int ni = i + 1;
      while (ni < s.size() && s[ni] == s[i]) {
        r++;
        ni++;
      }
      if (r % 2 != 0) {
        correct.insert(s[i]);
      }
      if (ni == s.size())
        break;
      else
        i = ni - 1;
    }
    for (char v : correct) {
      printf("%c", v);
    }
    printf("\n");
    correct.clear();
  }
}
