#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, temp;
  long long int j, t, x, a, b, l, m;
  char s[510];
  int ct[27], i;
  cin >> t;
  while (t--) {
    for (i = 1; i < 27; i++) ct[i] = 0;
    cin >> s;
    for (i = 0; i < strlen(s); i++) {
      if (s[i] != s[i + 1])
        ct[(int)s[i] - 97 + 1]++;
      else
        i += 1;
    }
    for (i = 1; i < 27; i++) {
      if (ct[i] != 0) cout << (char)(96 + i);
    }
    cout << "\n";
  }
}
