#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  for (int i = 0; i < t; i++) {
    char arr[500] = {0};
    cin >> arr;
    int n = 0;
    while (arr[n] != 0) {
      n++;
    }
    int fine[26] = {0};
    for (int j = 0; j < n; j++) {
      if (fine[int(arr[j]) - 97] == 0) {
        int k = 0;
        int q = j;
        while (arr[q] == arr[j]) {
          k++;
          q++;
        }
        if (k % 2 == 1) {
          fine[int(arr[j]) - 97] = 1;
        }
        j = q - 1;
      }
    }
    for (int j = 0; j < 26; j++) {
      if (fine[j] == 1) {
        cout << char(j + 97);
      }
    }
    cout << endl;
    getchar();
  }
}
