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