import sys
input = sys.stdin.readline
L,C = map(int,input().split())
datas = list(input().split())
datas.sort()
choose = []
vows = ['a', 'e', 'i', 'o', 'u']
def is_possible(choose):
vow = 0
for c in choose:
if c in vows:
vow += 1
con = L - vow
return (vow >= 1 and con >= 2)
def combinations(index, level):
if level == L:
if is_possible(choose):
print(''.join(choose))
return
for i in range(index, C):
choose.append(datas[i])
combinations(i+1, level+1)
choose.pop()
combinations(0,0)