#include <bits/stdc++.h>
using namespace std;
void solve() {
  string s;
  cin >> s;
  int n = s.length(), i = 0;
  vector<int> cnt(26, 0), ok(26, 0);
  while (i < n) {
    cnt[s[i] - 'a']++;
    int j = i;
    while (s[j] == s[i]) j++;
    if ((j - i) & 1) ok[s[i] - 'a'] = 1;
    i = j;
  }
  for (int i = 0; i < 26; i++) {
    char ch = 'a' + i;
    if (cnt[i] && ok[i]) cout << ch;
  }
  cout << '\n';
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
}
