#include <bits/stdc++.h>
using namespace std;
const int maxn = 507;
char s[maxn];
int vis[26];
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    memset(vis, 0, sizeof(vis));
    scanf("%s", s);
    for (int i = 0; s[i] != '\0';) {
      if (s[i + 1] == '\0') {
        vis[s[i] - 'a'] = 1;
        i++;
      } else if (s[i] != s[i + 1]) {
        vis[s[i] - 'a'] = 1;
        i++;
      } else {
        i += 2;
      }
    }
    for (int i = 0; i < 26; i++)
      if (vis[i]) printf("%c", i + 'a');
    printf("\n");
  }
  return 0;
}
