n,k=map(int,input().split())
s=input()
result=''
for i in range(n):
    if i==k-1:
        p=str(s[i]).lower()
        result+=p
    else:
        result+=s[i]
print(result) n,k=map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k s=input() s input() input result='' result '' for i in range(n):
    if i==k-1:
        p=str(s[i]).lower()
        result+=p
    else:
        result+=s[i] i range(n) range n if i==k-1:
        p=str(s[i]).lower()
        result+=p
    else:
        result+=s[i] i==k-1 i k-1 k 1 p=str(s[i]).lower() p str(s[i]).lower() (s[i]).lower (s[i]) str s[i] s i lower result+=p result p result+=s[i] result s[i] s i print(result) print result k=map(int,input().split()) map(int,input().split()) k p=str(s[i]).lower() str(s[i]).lower() p n,k=map(int,input().split()) map(int,input().split()) n result+=p p result result='' '' result s=input() input() s result+=s[i] s[i] result
n,k=map(int,input().split())
s=input()
result=''
for i in range(n):
    if i==k-1:
        p=str(s[i]).lower()
        result+=p
    else:
        result+=s[i]
print(result)