#include <bits/stdc++.h>
using namespace std;
int dx[] = {-1, -1, -1, 0, 1, 1, 1, 0}, dy[] = {-1, 0, 1, 1, 1, 0, -1, -1};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int test_cases = 1;
  cin >> test_cases;
  for (long long int it = 0; it < test_cases; it++) {
    string s;
    cin >> s;
    s += " ";
    long long int n = s.length();
    if (n == 1) {
      cout << s << "\n";
      continue;
    }
    vector<int> arr(26, 0);
    for (int i = 0; i < n - 1; i++) {
      if (s[i] != s[i + 1]) arr[s[i] - 'a'] = 1;
      if (s[i] == s[i + 1]) i++;
    }
    string ans = "";
    for (int i = 0; i < 26; i++) {
      if (arr[i] == 1) ans += ('a' + i);
    }
    cout << ans << "\n";
  }
}
