import java.util.Scanner; public class No_486 { public static void main(String[] args){ String Str; int West=0,East=0; Scanner scanner = new Scanner(System.in); Str = scanner.next(); scanner.close(); for(int i=0;i=3){ System.out.println("East"); return;} } if(Str.charAt(i)=='X'){ West=0; East++; if(East>=3){ System.out.println("West"); return;} } } System.out.println("NA"); } }