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 C (GCC 5.4.1) (judge verdict: Wrong Answer)

#include <stdio.h>
#include <string.h>


int main(void)
{
    int ok = 0;
    char S[1000001];
    char temp[1024];
    char *p;

    scanf("%s", S);
    p = S;
    while(*p != '\0'){
        if(strlen(p) >= 5){
            strncpy(temp, p, 5);
            temp[5] = '\0';
        }else{
            break;
        }

        if(strcmp(temp, "dream") != 0 && strcmp(temp, "erase") != 0){
            break;
        }

        p += 5;

        if(p[0] == 'e' && p[1] == 'r' && p[2] != 'a'){
            p += 2;
        }else if(p[0] == 'r'){
            p += 1;
        }
    }

    if(*p == '\0'){
        printf("YES\n");
    }else{
        printf("NO\n");
    }

    return 0;
}