정규표현식과 조합(combinations)을 이용해서 풀었다.
from itertools import combinations
import re
l,c=map(int,input().split())
alpha=list(input().split())
alpha.sort()
for x in combinations(alpha,l):
tmp=''.join(x)
vowels_cnt=len(re.findall('[aeiou]',tmp))
consonant_cnt=len(re.findall('[^aeiou]',tmp))
if vowels_cnt>=1 and consonant_cnt>=2:
print(''.join(x))