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