from itertools import permutations N = int(input()) a = [input() for i in range(N)] vow = ["i","a","a","e","u","u"] con = [" ","n","b","m","g","r"] vow_all = set( permutations(vow)) con_all = set( permutations(con)) all_list = set() for v in vow_all: for c in con_all: strings = '' for k in range(6): strings = strings + c[k] + v[k] all_list.add( strings.replace(' ','') ) a = set(a) all_list -= a if len(all_list) == 0: print('NO') else: print('%s' % all_list.pop())