#include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 5;
const int MOD = 1e9 + 7;
bool gd[26];
void solve() {
  fill(gd, gd + 26, false);
  string s;
  cin >> s;
  char pr = s[0];
  int cnt = 1;
  for (int i = 1; i < s.size(); ++i) {
    if (s[i] == pr) {
      cnt++;
    } else {
      if (cnt % 2 == 1) {
        gd[pr - 'a'] = true;
      }
      cnt = 1;
      pr = s[i];
    }
  }
  if (cnt % 2) {
    gd[pr - 'a'] = true;
  }
  for (int i = 0; i < 26; ++i) {
    if (gd[i]) cout << (char)('a' + i);
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int q;
  cin >> q;
  for (int i = 0; i < q; ++i) {
    solve();
    cout << "\n";
  }
  return 0;
}
