#include using namespace std; int main() { int N; cin >> N; map mp; for (int i = 0; i < N; i ++) { string s; cin >> s; for (char c = 'a'; c <= 'z'; c ++) { string t = s + c; sort(t.begin(), t.end()); mp[t] ++; } } for (auto& [k, v] : mp) { if (v == 1) { cout << k << endl; return 0; } } puts("-1"); }