defmodule Main do def main do s = IO.gets("") |> String.trim() |> String.to_charlist() [i, j] = IO.gets("") |> String.trim() |> String.split() |> Enum.map(&(String.to_integer(&1))) s_i = Enum.at(s, i) s_j = Enum.at(s, j) s |> List.replace_at(i, s_j) |> List.replace_at(j, s_i) |> IO.puts() end end