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

s = input()

L = []
for i in range(n):
    L.append(s[i])

L[k-1] = str.lower(L[k-1])
ans = str()
for i in range(n):
    ans += L[i]
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 L = [] L [] for i in range(n):
    L.append(s[i]) i range(n) range n L.append(s[i]) L.append L append s[i] s i L[k-1] = str.lower(L[k-1]) L[k-1] L k-1 k 1 str.lower(L[k-1]) str.lower str lower L[k-1] L k-1 k 1 ans = str() ans str() str for i in range(n):
    ans += L[i] i range(n) range n ans += L[i] ans L[i] L i print(ans) print ans n, k = map(int, input().split()) map(int, input().split()) n k = map(int, input().split()) map(int, input().split()) k L = [] [] L s = input() input() s ans = str() str() ans ans += L[i] L[i] ans
n, k = map(int, input().split())

s = input()

L = []
for i in range(n):
    L.append(s[i])

L[k-1] = str.lower(L[k-1])
ans = str()
for i in range(n):
    ans += L[i]
print(ans)
    
