#include #include #define N 100 void hantei(const char a[]){ char s1[]="OOO"; char s2[]="XXX"; char *east; char *west; if(east = strstr(a,s1)) printf("East"); else if(west = strstr(a,s2)) printf("West"); else printf("NA"); } int main(){ char S[N]; scanf("%s",S); hantei(S); return 0; }