func main() var n: int :: cui@inputInt() var k: int :: cui@inputInt() var s: []char :: cui@inputStr() var ans: []char :: s.sub(k - 1, n - k + 1) do s :: s.sub(0, k - 1) if((n - k) % 2 = 0) do s.reverse() end if do ans :~ s do cui@print("\{ans}\n") end func