defmodule Main do
  def main do
    n = IO.gets("") |> String.trim() |> String.to_integer()

    assign_int(n, [])
    |> Enum.reverse()
    |> Enum.reduce(fn x, acc -> x <> acc end)
    |> IO.inspect()
  end

  defp assign_int(n, lst) when n <= 26 do
    alp =
      case rem(n, 26) do
        0 ->
          "z"

        1 ->
          "a"

        2 ->
          "b"

        3 ->
          "c"

        4 ->
          "d"

        5 ->
          "e"

        6 ->
          "f"

        7 ->
          "g"

        8 ->
          "h"

        9 ->
          "i"

        10 ->
          "j"

        11 ->
          "k"

        12 ->
          "l"

        13 ->
          "m"

        14 ->
          "n"

        15 ->
          "o"

        16 ->
          "p"

        17 ->
          "q"

        18 ->
          "r"

        19 ->
          "s"

        20 ->
          "t"

        21 ->
          "u"

        22 ->
          "v"

        23 ->
          "w"

        24 ->
          "x"

        25 ->
          "y"
      end

    [alp | lst]
  end

  defp assign_int(n, lst) do
    new_n = div(n, 26)

    alp =
      case rem(n, 26) do
        0 ->
          "z"

        1 ->
          "a"

        2 ->
          "b"

        3 ->
          "c"

        4 ->
          "d"

        5 ->
          "e"

        6 ->
          "f"

        7 ->
          "g"

        8 ->
          "h"

        9 ->
          "i"

        10 ->
          "j"

        11 ->
          "k"

        12 ->
          "l"

        13 ->
          "m"

        14 ->
          "n"

        15 ->
          "o"

        16 ->
          "p"

        17 ->
          "q"

        18 ->
          "r"

        19 ->
          "s"

        20 ->
          "t"

        21 ->
          "u"

        22 ->
          "v"

        23 ->
          "w"

        24 ->
          "x"

        25 ->
          "y"
      end

    assign_int(new_n, [alp | lst])
  end
end