#include <bits/stdc++.h>
using namespace std;
int main() {
  int z;
  string s;
  cin >> z;
  for (int i = 0; i < z; i++) {
    int y, j[126] = {0};
    cin >> s;
    y = 0;
    while (y < s.length()) {
      if (s[y] == s[y + 1]) {
        s[y] = ' ';
        s[y + 1] = ' ';
      }
      y++;
    }
    for (y = 0; y < s.length(); y++) j[s[y]]++;
    for (char c = 'a'; c <= 'z'; c++)
      if (j[c]) cout << c;
    cout << "\n";
  }
  return 0;
}
