#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  char s[600];
  int coun[600];
  int p[600];
  scanf("%d", &n);
  while (n--) {
    memset(coun, 0, sizeof coun);
    memset(p, 0, sizeof p);
    scanf("%s", s);
    int len = strlen(s);
    int k = 1;
    for (int i = 0; i < len - 1; i++) {
      if (p[s[i]] == 1) continue;
      while ((s[i] == s[i + 1]) && i + 1 < len) {
        k++;
        i++;
      }
      if (k % 2 != 0) {
        p[s[i]] = 1;
      }
      k = 1;
    }
    if (s[len - 1] != 1) {
      if (s[len - 1] != s[len - 2]) {
        p[s[len - 1]] = 1;
      }
    }
    for (char i = 'a'; i <= 'z'; i++) {
      if (p[i] == 1) printf("%c", i);
    }
    printf("\n");
  }
  return 0;
}
