#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define REP(i,a,n) for(int i=(a); i<(int)(n); i++) #define rep(i,n) REP(i,0,n) //#define FOR(it,c) for(__typeof((c).begin()) it=(c).begin(); it!=(c).end(); ++it) #define ALLOF(c) (c).begin(), (c).end() typedef long long ll; char nameChars[11] = {'i','a','a','e','u','u','n','b','m','g','r'}; char ans[11]; bool used[11]; set usedNames; bool judge() { bool beforeBoin = false; rep(i,11) { REP(j,11-5,11) { if (ans[i] == nameChars[j]) { if (i == 10)return false; //name no saigo ga siin if (beforeBoin) return false; else beforeBoin = true; goto SKIP_I; } } beforeBoin = false; SKIP_I:; } return usedNames.find(ans) == usedNames.end(); } bool f_find(int count) { if (count == 11) { return judge(); } rep(i,11) { if (!used[i]) { ans[count] = nameChars[i]; used[i] = true; if (f_find(count+1)) { return true; } used[i] = false; ans[count] = NULL; } } return false; } int main() { int n; string tmp; cin >> n; rep(i,n) { cin >> tmp; usedNames.insert(tmp); } if (f_find(0)) { cout << ans << endl; } else cout << "NO" << endl; return 0; }