module Main open System let s = [ for c in Console.ReadLine() -> c] let rec calc = function | w :: x :: y :: zs when w = x && x = y && y = 'O' -> "East" | w :: x :: y :: zs when w = x && x = y -> "West" | _ :: zs -> calc zs | _ -> "NA" Console.WriteLine(calc s)