se = set() T = [] used = [False] * 11 S = "inamameguru" T = [] bo = set(["i", "a", "e", "u"]) def dfs(t): if t == 11: if T[-1] in bo: se.add("".join(T)) return for i in range(11): if used[i]: continue if t != 0 and T[-1] not in bo and S[i] not in bo: continue T.append(S[i]) used[i] = True dfs(t + 1) T.pop() used[i] = False dfs(0) 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")