from itertools import permutations, combinations_with_replacement
def solution(word):
answer = 0
alphabets = ['A', 'E', 'I', 'O', 'U']
A = []
for i in range(1,6):
ik = combinations_with_replacement(alphabets,i)
ik = set(ik)
for k in ik:
j = set(permutations(k))
for kk in j:
ka = ''.join(kk)
A.append(ka)
A.sort(key = lambda x:x)
# A.index(word)
return A.index(word)+1