#include <bits/stdc++.h>
using namespace std;
int n;
string s;
int a[30];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  while (n--) {
    cin >> s;
    for (int i = 0; i < 26; i++) a[i] = 0;
    int tam = 0;
    s = s + ' ';
    for (int i = 0; i < s.size() - 1;) {
      int j = i;
      while (s[j] == s[i]) j++;
      if ((j - i) % 2 == 1) a[s[i] - 'a'] = 1;
      i = j;
    }
    for (int i = 0; i < 26; i++)
      if (a[i] == 1) cout << char('a' + i);
    cout << "\n";
  }
  return 0;
}
