#include <bits/stdc++.h>   using namespace std;   int main() {     ios_base ::sync_with_stdio(0);     cin.tie(0);     ;     long long int t;     cin >> t;     while (t--) {       string s;       cin >> s;       long long int a[26] = {0};       long long int cnt = 0;       char c;       int i = 0;       while (i < s.length()) {         cnt = 0;         c = s[i];         while (s[i] == c && i < s.length()) {           cnt++;           i++;         }         if (cnt % 2 != 0) {           a[c -  a ] = 1;         }       }       string ans =   ;       for (i = 0; i < 26; i++) {         if (a[i] == 1) {           ans += (i +  a );         }       }       cout << ans << endl;     }   }   