defmodule Main do def main do IO.read(:line) |> String.split() |> solve |> IO.puts() end defp solve([w, h, c]) do d = cond do c == "B" -> "W" true -> "B" end 0..((h |> String.to_integer()) - 1) |> Enum.map(fn i -> 0..((w |> String.to_integer()) - 1) |> Enum.map(fn j -> cond do (i - j) |> rem(2) == 0 -> c true -> d end end) |> Enum.join() end) |> Enum.join("\n") end end