#include #include #include using namespace std; using ll = long long; int N; map cnt; int main(void){ ios::sync_with_stdio(false); cin.tie(nullptr); cin >> N; 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()); cnt[t]++; } } for(auto [s, p] : cnt){ if(p == 1){ cout << s << endl; return 0; } } cout << -1 << endl; return 0; }