#include using namespace std; using ll = long long; templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b> s; ll a_win = 0; ll b_win = 0; for(char c : s){ if(c=='O'){ a_win++; b_win = 0; }else{ b_win++; a_win = 0; } if(a_win==3){ p("East"); return 0; } if(b_win==3){ p("West"); return 0; } } p("NA"); return 0; }