import itertools se = set() S = "iaaeuu" T = "nbmgr" for s in itertools.permutations(S): for t in itertools.permutations(T): name = [] for s, t in zip(S, T): name.append(s + t) name.append(S[-1]) se.add("".join(name)) n = int(input()) for _ in range(n): S = input() if S in se: se.remove(S) for s in se: print(s) exit() print("NO")