l, c = map(int, input().split())
password = sorted(input().split())


def check_password_dfs(idx, sub_password, sub_vowel_count, sub_consonant_count):
    if len(sub_password) == l:
        if sub_vowel_count >= 1 and sub_consonant_count >= 2:
            print(''.join(sub_password))
        return

    if idx == len(password):
        return

    # 현재 idx를 넣는 경우
    if password[idx] in ['a', 'e', 'i', 'o', 'u']:
        check_password_dfs(idx + 1, sub_password + [password[idx]], sub_vowel_count + 1, sub_consonant_count)
    else:
        check_password_dfs(idx + 1, sub_password + [password[idx]], sub_vowel_count, sub_consonant_count + 1)

    # 현재 idx를 안넣는 경우
    check_password_dfs(idx + 1, sub_password, sub_vowel_count, sub_consonant_count)


check_password_dfs(0, [], 0, 0)
