using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace yukicoder { class Program { static void Main(string[] args) { string s = Console.ReadLine(); for(int i = 0;i < s.Length - 2; i++) { string x = s.Substring(i, 3); if (x == "XXX") { Console.WriteLine("West"); return; }else if(x == "OOO") { Console.WriteLine("East"); return; } } Console.WriteLine("NA"); Console.ReadLine(); } } }