defmodule Main do def main do IO.read(:line) |> String.trim() |> solve |> IO.puts() end defp solve(str) do str |> String.to_charlist() |> Enum.with_index() |> Enum.map(fn {s, i} -> alphabet() |> Enum.at( (Enum.find_index(alphabet(), &(&1 == s)) - i - 1) |> rem(26) ) |> (&([&1])).() end) |> Enum.join() end defp alphabet do ?A..?Z |> Enum.map(&([&1])) |> Enum.join() |> String.to_charlist() end end