from collections import * from itertools import * from functools import * from heapq import * import sys,math # input = sys.stdin.readline N = int(input()) S = set([input() for _ in range(N)]) X = list('inabameguru') A = X[0::2] B = X[1::2] n = len(B) for pa in permutations(A): for pb in permutations(B): ans = pa[0] for i in range(n): ans += pb[i] + pa[i+1] if ans in S: continue print(ans) exit() print('NO')