import java.util.Scanner; public class EWgame { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String str = sc.next(); char[] c = new char[str.length()]; for(int i = 0;i= 3){ System.out.println("East"); break; } }else if(c[i] == 'X'){ east = 0; west++; if(west >= 3){ System.out.println("West"); break; } } } if(east<3 && west < 3){ System.out.println("NA"); } } }