n, k = map(int, input().split())
s = input()
s = s[k-1:] + s[:k-1]
ans = s.capitalize().swapcase()
print(ans[n-k+1:] + ans[:n-k+1]) n, k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k s = input() s input() input s = s[k-1:] + s[:k-1] s s[k-1:] + s[:k-1] s[k-1:] s k-1: k-1 k 1 s[:k-1] s :k-1 k-1 k 1 ans = s.capitalize().swapcase() ans s.capitalize().swapcase() s.capitalize().swapcase s.capitalize() s.capitalize s capitalize swapcase print(ans[n-k+1:] + ans[:n-k+1]) print ans[n-k+1:] + ans[:n-k+1] ans[n-k+1:] ans n-k+1: n-k+1 n-k n k 1 ans[:n-k+1] ans :n-k+1 n-k+1 n-k n k 1 ans = s.capitalize().swapcase() s.capitalize().swapcase() ans n, k = map(int, input().split()) map(int, input().split()) n k = map(int, input().split()) map(int, input().split()) k s = s[k-1:] + s[:k-1] s[k-1:] + s[:k-1] s s = input() input() s
n, k = map(int, input().split())
s = input()
s = s[k-1:] + s[:k-1]
ans = s.capitalize().swapcase()
print(ans[n-k+1:] + ans[:n-k+1])