1 #include <iostream>
   2 #include <sstream>
   3 #include <string>
   4 #include <algorithm>
   5 #include <vector>
   6 #include <map>
   7 using namespace std;
   8 
   9 #define GI ({int _t; scanf("%d", &_t); _t;})
  10 #define FOR(i, a, b) for (int i=a; i<b; i++)
  11 #define REP(i, a) FOR(i, 0, a)
  12 template<class T> string toString(T n){ostringstream ost;ost<<n;ost.flush();return ost.str();}
  13 int toInt(string s){int r=0;istringstream sin(s);sin>>r;return r;}
  14 #define DBG(x) cout << #x << "::" << x << endl;
  15 #define DBGV(_v) { REP(_i, _v.size()) { cout << _v[_i] << "\t";} cout << endl;}
  16 bool isUpperCase(char c){return c>='A' && c<='Z';}
  17 bool isLowerCase(char c){return c>='a' && c<='z';}
  18 bool isLetter(char c){return c>='A' && c<='Z' || c>='a' && c<='z';}
  19 bool isDigit(char c){return c>='0' && c<='9';}
  20 char toLowerCase(char c){return (isUpperCase(c))?(c+32):c;}
  21 char toUpperCase(char c){return (isLowerCase(c))?(c-32):c;}
  22 
  23 string parse(string s) {
  24 	REP(i, s.size()) s[i] = toLowerCase(s[i]);
  25 	sort(s.begin(), s.end());
  26 	return s;
  27 }
  28 
  29 int main() {
  30 	string s ;
  31 	vector <string> res;
  32 	map <string, int> count;
  33 	map <string, string> lookup;
  34 	while (cin >> s) {
  35 		if ( s == "#") break;
  36 		else {
  37 			string t = parse(s);
  38 			count[t]++;
  39 			lookup[t] = s;
  40 		}
  41 	}
  42 	for (map <string, int>::iterator it = count.begin(); it != count.end(); it++) {
  43 		if (it->second == 1) {
  44 			res.push_back(lookup[it->first]);
  45 		}
  46 	}
  47 	sort(res.begin(), res.end());
  48 	REP(i, res.size()) {
  49 		printf("%s\n", res[i].c_str());
  50 	}
  51 	return 0;
  52 }