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() |> solve(k) |> IO.puts() end def solve(s, k) do {a, b} = s |> String.split_at(k - 1) b <> a end end