#include<stdio.h>
#include<string.h>
int main()
{
char str[2000],store;
int i,j,k,len,f,count;
while(gets(str)!=NULL)
{ f=0;
if(((str[0]>='a')&&(str[0]<='z'))||((str[0]>='A')&&(str[0]<='Z')))
{
len=strlen(str);
store=str[0];
count=0;
for(j=0;j<len;j++)
{
if(str[j]==32)
count=count+1;
}
for(i=1;i<len;i++)
{
if(str[i-1]==32)
{
if((store==str[i])||((store-32)==str[i])||((store+32)==str[i]))
{
f=1;
}
else
{ f=0;
break;
}
}
}
if((f==0)&&(count>0))
printf("N\n");
else
printf("Y\n");
}
else
break;
}
return 0;
}
#include<string.h>
int main()
{
char str[2000],store;
int i,j,k,len,f,count;
while(gets(str)!=NULL)
{ f=0;
if(((str[0]>='a')&&(str[0]<='z'))||((str[0]>='A')&&(str[0]<='Z')))
{
len=strlen(str);
store=str[0];
count=0;
for(j=0;j<len;j++)
{
if(str[j]==32)
count=count+1;
}
for(i=1;i<len;i++)
{
if(str[i-1]==32)
{
if((store==str[i])||((store-32)==str[i])||((store+32)==str[i]))
{
f=1;
}
else
{ f=0;
break;
}
}
}
if((f==0)&&(count>0))
printf("N\n");
else
printf("Y\n");
}
else
break;
}
return 0;
}