#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e3 + 10;
char s[maxn];
int ans[30], book[maxn];
int main() {
  int T;
  scanf("%d", &T);
  while (T--) {
    memset(book, 0, sizeof(book));
    memset(ans, 0, sizeof(ans));
    scanf("%s", s + 1);
    int n = strlen(s + 1);
    for (int i = 2; i <= n; i++)
      if (s[i] == s[i - 1] && book[i] == 0 && book[i - 1] == 0)
        book[i] = book[i - 1] = 1;
    for (int i = 1; i <= n; i++)
      if (!book[i]) ans[s[i] - 'a'] = 1;
    for (int i = 0; i < 30; i++)
      if (ans[i] == 1) printf("%c", (char)i + 'a');
    printf("\n");
  }
}
