#include <bits/stdc++.h>
using namespace std;
const int N = 505;
char s[N];
bool ans[26];
void solve() {
  scanf("%s", s);
  int n = strlen(s);
  for (int c = 0; c < 26; ++c) ans[c] = false;
  int cnt = 1;
  for (int i = 1; i < n; ++i) {
    if (s[i] != s[i - 1]) {
      if (cnt & 1) ans[s[i - 1] - 'a'] = true;
      cnt = 1;
    } else
      ++cnt;
  }
  if (cnt & 1) ans[s[n - 1] - 'a'] = true;
  for (int c = 0; c < 26; ++c)
    if (ans[c]) printf("%c", char('a' + c));
  printf("\n");
}
int main() {
  int test;
  scanf("%d", &test);
  while (test--) solve();
}
