#include using namespace std; using ll = long long; int main(){ cin.tie(nullptr); ios_base::sync_with_stdio(false); int N; string S; cin >> N; map, int> mp; for (int i=0; i> S; vector v(26); for (auto x : S) v[x-'a']++; for (int j=0; j<26; j++){ v[j]++; mp[v]++; v[j]--; } } for (auto &[x, y] : mp){ if (y == 1){ for (int j=0; j<26; j++) cout << string(x[j], 'a'+j); cout << endl; return 0; } } cout << -1 << endl; return 0; }