import java.util.*; class Test33{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); String str = sc.next(); if(str.indexOf("〇〇〇") != -1){ System.out.println("East"); }else if(str.indexOf("×××") != -1){ System.out.println("West"); }else{ System.out.println("NA"); } } }