#include<stdio.h>
#include<string.h>
char ch[300];
int cheak(char p)
{
if(p=='a'||p=='e'||p=='i'||p=='o'||p=='u'||p=='y')
return 1;
else
return 0;
}
int main()
{
int i,n,a[3];
char ch1[]="e/o/i";
while(gets(ch))
{
if(strcmp(ch,ch1)==0)
break;
memset(a,0,sizeof(a));
n=0;
for(i=0;ch[i]!='\0';i++)
{
if(ch[i]=='/')
{
n++;
continue;
}
if(cheak(ch[i])==1)
{
if(i==0||cheak(ch[i-1])==0)
a[n]++;
}
}
if(a[0]!=5)
printf("1\n");
else if(a[1]!=7)
printf("2\n");
else if(a[2]!=5)
printf("3\n");
else
printf("Y\n");
}
return 0;
}