Problem:
Score : 100 points

Problem Statement

Given a lowercase English letter c, determine whether it is a vowel. Here, there are five vowels in the English alphabet: a, e, i, o and u.

Constraints

c is a lowercase English letter.

Input

The input is given from Standard Input in the following format:

c

Output

If c is a vowel, print vowel. Otherwise, print consonant.

Sample Input 1

a

Sample Output 1

vowel

Since a is a vowel, print vowel.

Sample Input 2

z

Sample Output 2

consonant

Sample Input 3

s

Sample Output 3

consonant

Solution in Python (3.4.3) (judge verdict: Wrong Answer)

#ABC49-C
S=input()
divide=["dream","dreamer","erase","eraser"]
for i in range(4): #４つの文字群を反転
    divide[i]=divide[i][::-1]
len_s=len(S)
S=S[::-1]

check=0
i=0
a=[]
while check==0:
    if i==len_s: #ぴったり終わりの時
        a.append(1)
        break
    if len_s-i <5: #残りが５文字未満のとき、これ以上見つけられない。
        check=1
        a.append(2)
        break
    if S[i:i+5] == divide[0]:
        i=i+5
        a.append(3)
        continue
    if S[i:i+5] == divide[2]:
        i=i+5
        a.append(4)
        continue
    if len_s-i <7: #残りが７文字未満のとき、これ以上見つけられない。
        check=1
        a.append(5)
        break
    if S[i:i+7] == divide[1]:
        i=i+7
        a.append(6)
        continue
    if S[i:i+7] == divide[3]:
        i=i+7
        a.append(7)
        continue


if check==0:
    print("YES")
else:
    print("NO")
#print(a)