import itertools def isshiin(c): return (c !='a' and c!= 'u' and c!='i' and c!='e') OriginalName ="inabameguru" Shiin = "nbmgr" Boin = "iaaeuu" N = int(input()) S = [] # 使用済み名前のリスト for x in range(N): S.append(input()) flag = False # 終了フラグ # すべての子音の並びについて for s in itertools.permutations(Shiin): # すべての母音の並びについて for b in itertools.permutations(Boin): for i in range(6): result = "" for j in range(i): result += s[j] result += b[j] result += b[i] for j in range(i, 5): result += s[j] result += b[j+1] if(not result in S): flag = True break; if(flag): break; if(flag): break; if(flag): print(result) else: print("NO")