n,k = map(int,input().split())

s = list(input())
t = ''
for j,i in enumerate(s):
    if j == k-1:t += i.lower()
    else:t+=i
print(t) n,k = map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k s = list(input()) s list(input()) list input() input t = '' t '' for j,i in enumerate(s):
    if j == k-1:t += i.lower()
    else:t+=i j i enumerate(s) enumerate s if j == k-1:t += i.lower()
    else:t+=i j == k-1 j k-1 k 1 print(t) print t n,k = map(int,input().split()) map(int,input().split()) n s = list(input()) list(input()) s k = map(int,input().split()) map(int,input().split()) k t = '' '' t
n,k = map(int,input().split())

s = list(input())
t = ''
for j,i in enumerate(s):
    if j == k-1:t += i.lower()
    else:t+=i
print(t)
