//inlclude前用define #define _USE_MATH_DEFINES //include #include #include #include #include #include using namespace std; //typedef typedef vector VI; typedef vector VS; typedef vector VC; int main() { string s; cin >> s; int east = 0; int west = 0; int size = s.size(); for (int i = 0; i < size; i++) { if (s[i] == 'O') { east++; west = 0; } else if (s[i] == 'X') { west++; east = 0; } if (west == 3) { cout << "West" << endl; return 0; } else if(east==3){ cout << "East" << endl; return 0; } } cout << "NA" << endl; return 0; }