defmodule Main do def main do IO.gets("") |> String.trim() |> String.split() |> Enum.map(&String.to_integer(&1)) |> (fn d -> cond do List.last(d) == 1 || d |> Enum.slice(0..-2) |> Enum.sum() < 2 -> "SURVIVED" true -> "DEAD" end end).() |> IO.puts() end end