defmodule Main do def main do IO.read(:line) |> String.trim() |> String.split() |> solve |> IO.puts() end def solve([a, b, c]) do "#{ok?(a, b, c, 1)}#{ok?(a, b, c, 4)}" end def ok?(a, b, c, lack) do cond do [a, b, c] |> Enum.map(fn x -> case x do "?" -> lack _ -> x |> String.to_integer() end end) |> (fn [a, b, c] -> a != b && b != c && c != a && ([a, b, c] |> Enum.max() == b || [a, b, c] |> Enum.min() == b) end).() -> lack true -> "" end end end