import std; void main() { int N, K; readf("%d %d\n", N, K); auto S = readln.chomp; --K; auto res = S[K..$] ~ S[0..K]; res.writeln; }