#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    string str, res;
    int ch[26] = {0};
    cin >> str;
    for (int i = 0; i < str.size(); i++) {
      if (i + 1 >= str.size() || str[i] != str[i + 1])
        ch[str[i] - 'a'] = 1;
      else
        i++;
    }
    for (int i = 0; i < 26; i++) {
      if (ch[i] == 1) res.push_back((char)(i + 'a'));
    }
    cout << res << "\n";
  }
  return 0;
}
static auto fast = [] {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  return 0;
}();
