N,K = map(int,input().split()) S = input() print(S[K-1:]+S[0:K-1])