N,K = map(int, input().split())
S = str(input())
A = ''
for i in range(N):
    if i + 1 == K:
        A += S[i].lower()
    else:
        A += S[i]
print(A) 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 A = '' A '' for i in range(N):
    if i + 1 == K:
        A += S[i].lower()
    else:
        A += S[i] i range(N) range N if i + 1 == K:
        A += S[i].lower()
    else:
        A += S[i] i + 1 == K i + 1 i 1 K A += S[i].lower() A S[i].lower() [i].lower [i] S i lower A += S[i] A S[i] S i print(A) print A K = map(int, input().split()) map(int, input().split()) K N,K = map(int, input().split()) map(int, input().split()) N S = str(input()) str(input()) S A = '' '' A A += S[i].lower() S[i].lower() A A += S[i] S[i] A
N,K = map(int, input().split())
S = str(input())
A = ''
for i in range(N):
    if i + 1 == K:
        A += S[i].lower()
    else:
        A += S[i]
print(A)