N,K = list(map(int,input().split()))
S = input()
S_list = list(S)
K -= 1
answer = ""
S_list[K] = S_list[K].swapcase()

for x in S_list:
    answer += x
print(answer) N,K = list(map(int,input().split())) N list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split K S = input() S input() input S_list = list(S) S_list list(S) list S K -= 1 K 1 answer = "" answer "" S_list[K] = S_list[K].swapcase() S_list[K] S_list K S_list[K].swapcase() [K].swapcase [K] S_list K swapcase for x in S_list:
    answer += x x S_list answer += x answer x print(answer) print answer K -= 1 1 K S = input() input() S answer += x x answer N,K = list(map(int,input().split())) list(map(int,input().split())) N S_list = list(S) list(S) S_list K = list(map(int,input().split())) list(map(int,input().split())) K answer = "" "" answer
N,K = list(map(int,input().split()))
S = input()
S_list = list(S)
K -= 1
answer = ""
S_list[K] = S_list[K].swapcase()

for x in S_list:
    answer += x
print(answer)