問題一覧 > 通常問題

No.233 Meguru Goes Around (3)

レベル : / 実行時間制限 : 1ケース 1.000秒 / メモリ制限 : 128 MB / スペシャルジャッジ問題 (複数の解が存在する可能性があります)
タグ : (AC するまで非表示) / 解いたユーザー数 121
作問者 : LayCurse
お気に入りにしたユーザー ProblemId : 537 / 自分の提出
問題文最終更新日: 2026-06-25 13:40:14
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 112 (順位表) の他の問題:

Problem Statement

Oh, Senpai, chalo!
Huh, you're installing something right now?
This one's a social game that launches tomorrow!
So are you going to play some social game too, Senpai...?

Senpai, so you do yukicoder!
Meguru does yukicoder too, and she's ranked pretty high!
Besides that, Meguru is a top-ranked player in this game and that game too.
You say you've never seen anyone ranked in so many different games?
That's because Meguru changes her name for each game, and she's decided never to use the same name twice.

Meguru has decided that the names she uses must be anagrams of $\verb|inabameguru|$ that can be read as romaji.
Being readable as romaji means that no consonants are consecutive and that the name ends with a vowel.
Huh, the vowels are the $5$ letters $\verb|a|, \verb|i|, \verb|u|, \verb|e|, \verb|o|$..., even elementary school kids know that, you know?
How have you managed to live until now, Senpai...?
So far, in $N$ games, she has used the names $S_1,S_2,\ldots,S_N$ respectively, but she's wondering what name to use next...
Perfect timing, Senpai! Please choose one for her!!

Input

$N$
$S_1$
$S_2$
$\vdots$
$S_N$

$N$ is an integer greater than or equal to $0$.
$S_1,S_2,\ldots,S_N$ are the names Meguru has used so far in the $N$ games!

Output

Please output exactly $1$ name that Meguru can use in the next game!
Oh, and if none exists, please output $\verb|NO|$.
What will Meguru do in that case... She'll think about it by tomorrow!
This is a special judge problem, and don't forget the newline at the end!

Sample

Sample 1
Input
1
inabameguru
Output
meguruinaba
Sample 2
Input
3
inabameguru
meguruinaba
nemuriugaba
Output
meguriunaba
Sample 3
Input
0
Output
inabameguru

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。