#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    string s;
    cin >> s;
    for (char i = 'a'; i <= 'z'; i++) {
      int c = 0, fl = 0;
      for (int j = 0; j < s.size(); j++) {
        if (s[j] == i) {
          c++;
        } else {
          if (c % 2 != 0) {
            fl = 1;
            break;
          }
          c = 0;
        }
      }
      if (c % 2 != 0 || fl == 1) printf("%c", i);
    }
    puts("");
  }
}
