defmodule Main do def main do [_, k] = IO.read(:line) |> String.trim() |> String.split() |> Enum.map(&String.to_integer/1) IO.read(:line) |> String.trim() |> String.to_charlist() |> solve(k) |> IO.puts() end def solve(s, k) do {a, b} = s |> Enum.split(k - 1) b |> Enum.concat(a) end end