#include int main(void) { char s[101],*p,e=0,w=0; p=s; scanf("%s",s); while(*p!='\0'){ if(*p=='O'){ e++;w=0; }else{ w++;e=0; } if(e==3||w==3){ printf("%s\n",*p=='O'?"East":"West"); break; } p++; } if(*p=='\0'){ printf("NA\n"); } return 0; }