defmodule Main do def main do IO.gets("") |> (fn s -> case Regex.run(~r/(OOO|XXX)/, s) do nil -> "NA" ["OOO", _] -> "East" _ -> "West" end end).() |> IO.puts() end end