#include <bits/stdc++.h>
const int INF = 1E9 + 7;
using namespace std;
bool b[26];
char a[100];
void win() {
  string s;
  cin >> s;
  for (int i = 0; i < 26; i++) {
    b[i] = 1;
  }
  for (int i = 0; i < s.size(); i++) {
    if (s[i] != s[i + 1])
      b[s[i] - 'a'] = 0;
    else
      i++;
  }
  for (int i = 0; i < 26; i++) {
    if (b[i] == 0) cout << char(i + 'a');
  }
  cout << endl;
}
int main() {
  int n;
  cin >> n;
  while (n--) {
    win();
  }
}
