n,k=map(int,input().split())
s=input()
ans=""
for i in range(n):
    a=s[i]
    if i+1==k:
        a=a.swapcase()
    ans+=a
print(ans) n,k=map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k s=input() s input() input ans="" ans "" for i in range(n):
    a=s[i]
    if i+1==k:
        a=a.swapcase()
    ans+=a i range(n) range n a=s[i] a s[i] s i if i+1==k:
        a=a.swapcase()
     i+1==k i+1 i 1 k a=a.swapcase() a a.swapcase() a.swapcase a swapcase ans+=a ans a print(ans) print ans a=s[i] s[i] a n,k=map(int,input().split()) map(int,input().split()) n ans+=a a ans k=map(int,input().split()) map(int,input().split()) k s=input() input() s ans="" "" ans a=a.swapcase() a.swapcase() a
n,k=map(int,input().split())
s=input()
ans=""
for i in range(n):
    a=s[i]
    if i+1==k:
        a=a.swapcase()
    ans+=a
print(ans)
