using System; using System.Collections.Generic; using System.Linq; namespace Test { class Program { static void Main(string[] args) { string s = Console.ReadLine(); string ret = ""; for (int i = 0; i <= s.Length - 3; i++) { if (s.Substring(i,3) == "ooo" && ret == "") { ret = "East"; } else if (s.Substring(i,3) == "xxx" && ret == "") { ret = "West"; } } Console.WriteLine(ret == "" ? "NA" : ret); } } }