#include using namespace std; int main() { char s[100]; int west = 0,east = 0; for (int i = 0;i < 100;i++) { cin >> s[i]; if (s[i] == 'O') { east++; west = 0; } else if (s[i] == 'X'){ west++; east = 0; } if (east >= 3) { cout << "East" << endl; return 0; } if (west >= 3) { cout << "West" << endl; return 0; } } cout << "NA" << endl; }