#include <bits/stdc++.h>
using namespace std;
int work[26], t;
string s;
int main() {
  cin >> t;
  for (int i = 0; i < t; i++) {
    for (int j = 0; j < 26; j++) work[j] = -1;
    cin >> s;
    int it = 0;
    while (it < s.length()) {
      int itt = it;
      while (s[itt] == s[it]) it++;
      if (work[s[itt] - 'a'] != 1) work[s[itt] - 'a'] = (it - itt) % 2;
    }
    for (int i = 0; i < 26; i++) {
      char c;
      if (work[i] == 1) {
        c = 'a' + i;
        cout << c;
      }
    }
    cout << "\n";
  }
}
