#include <bits/stdc++.h>
using namespace std;
const int MAXINF = 2147483647;
const int INF = 0x3f3f3f3f;
const long long INFLL = 0x3f3f3f3f3f3f3f3f;
const double EPS = 1e-6;
int read() {
  int s = 0, f = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    s = s * 10 + c - '0';
    c = getchar();
  }
  s = s * f;
  return s;
}
long long readll() {
  long long s = 0, f = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    s = s * 10 + c - '0';
    c = getchar();
  }
  s = s * f;
  return s;
}
bool mark[26];
char ch[505];
int main() {
  int T;
  scanf("%d", &T);
  while (T--) {
    scanf("%s", ch);
    memset(mark, 0, sizeof(mark));
    int len = strlen(ch);
    if (len == 1) {
      printf("%s\n", ch);
      continue;
    }
    ch[len] = '#';
    int s = 1;
    for (register int i = 1; i <= len; ++i) {
      if (ch[i] == ch[i - 1])
        s++;
      else {
        if (s % 2) {
          mark[ch[i - 1] - 'a'] = 1;
        }
        s = 1;
      }
    }
    for (register int i = 0; i < 26; ++i) {
      if (mark[i]) printf("%c", i + 'a');
    }
    printf("\n");
  }
  return 0;
}
