#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200009;
const long long MOD = 998244353;
class {
 public:
  void solve() {
    int _;
    cin >> _;
    while (_--) {
      string s;
      cin >> s;
      vector<int> F(30);
      for (int i = 0; i < s.length();) {
        int j = i;
        while (i < s.length() && s[j] == s[i]) ++i;
        if ((i - j) & 1) F[s[j] - 'a'] = 1;
      }
      for (int i = 0; i < 30; ++i)
        if (F[i]) cout << char(i + 'a');
      cout << "\n";
    }
  }
} NSPACE;
int main() {
  ios_base::sync_with_stdio(false);
  cout.tie(0);
  cin.tie(0);
  NSPACE.solve();
}
