#include <bits/stdc++.h>
using namespace std;
const int maxn = 25;
long long ans = 0;
string ch;
int vis[30];
int main() {
  int t, len;
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> t;
  for (int I = 1; I <= t; I++) {
    cin >> ch;
    memset(vis, 0, sizeof(vis));
    len = ch.length();
    ch = ch + "#";
    for (int i = 0; i < len; i++) {
      if (ch[i] == ch[i + 1])
        i++;
      else
        vis[ch[i] - 'a'] = 1;
    }
    for (int i = 0; i < 26; i++) {
      if (vis[i]) {
        cout << char('a' + i);
      }
    }
    cout << '\n';
  }
  return 0;
}
