import Data.List main = getLine >>= putStrLn . maybe "NA" ((\c -> if c=='O' then "East" else "West") . head) . find ((>=3) . length) . group