N,K=map(int,input().split())
S=list(input())
for i in range(N):
    if i==K-1:
        S[i]=chr(ord(S[i])+32)
print(''.join(S)) 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 for i in range(N):
    if i==K-1:
        S[i]=chr(ord(S[i])+32) i range(N) range N if i==K-1:
        S[i]=chr(ord(S[i])+32) i==K-1 i K-1 K 1 S[i]=chr(ord(S[i])+32) S[i] S i chr(ord(S[i])+32) chr ord(S[i])+32 ord(S[i]) ord S[i] S i 32 print(''.join(S)) print ''.join(S) ''.join '' join S K=map(int,input().split()) map(int,input().split()) K S=list(input()) list(input()) S N,K=map(int,input().split()) map(int,input().split()) N
N,K=map(int,input().split())
S=list(input())
for i in range(N):
    if i==K-1:
        S[i]=chr(ord(S[i])+32)
print(''.join(S))