using System; using System.Collections.Generic; using System.Linq; using System.Text; class Program { static void Main(string[] args) { char[] A = Console.ReadLine().ToCharArray(); int west = 0; int east = 0; int count = 0; for (int i = 0; i < A.Length; i++) { if (A[i] == 'O') { east++; if (east == 3) { System.Console.WriteLine("East"); return; } west = 0; } else { west++; if (west == 3) { System.Console.WriteLine("West"); return; } east = 0; } } System.Console.WriteLine("NA"); } }