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

if s[k-1]=="A":
    s[k-1]=s[k-1].lower()
elif s[k-1]=="B":
    s[k-1]=s[k-1].lower()
elif s[k-1]=="C":
    s[k-1]=s[k-1].lower()

for i in range(n):
    print(s[i],end="") 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 if s[k-1]=="A":
    s[k-1]=s[k-1].lower()
elif s[k-1]=="B":
    s[k-1]=s[k-1].lower()
elif s[k-1]=="C":
    s[k-1]=s[k-1].lower() s[k-1]=="A" s[k-1] s k-1 k 1 "A" s[k-1]=s[k-1].lower() s[k-1] s k-1 k 1 s[k-1].lower() [k-1].lower [k-1] s k-1 k 1 lower elif s[k-1]=="B":
    s[k-1]=s[k-1].lower() s[k-1]=="B" s[k-1] s k-1 k 1 "B" s[k-1]=s[k-1].lower() s[k-1] s k-1 k 1 s[k-1].lower() [k-1].lower [k-1] s k-1 k 1 lower elif s[k-1]=="C":
    s[k-1]=s[k-1].lower() s[k-1]=="C" s[k-1] s k-1 k 1 "C" s[k-1]=s[k-1].lower() s[k-1] s k-1 k 1 s[k-1].lower() [k-1].lower [k-1] s k-1 k 1 lower for i in range(n):
    print(s[i],end="") i range(n) range n print(s[i],end="") print s[i] s i end="" end "" s = list(input()) list(input()) s k = map(int, input().split()) map(int, input().split()) k n, k = map(int, input().split()) map(int, input().split()) n
n, k = map(int, input().split())
s = list(input())

if s[k-1]=="A":
    s[k-1]=s[k-1].lower()
elif s[k-1]=="B":
    s[k-1]=s[k-1].lower()
elif s[k-1]=="C":
    s[k-1]=s[k-1].lower()

for i in range(n):
    print(s[i],end="")