n,k =map(int,input().split())
s =str(input())
ans = []
for i in range(n):
    if i == k-1:
        ans.append(s[i].lower())
        
    else:
        ans.append(s[i])

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

print(''.join(ans))
