N,K = map(int,input().split())
S = list(input())

x = S[K-1]
S[K-1] = x.lower()

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 x = S[K-1] x S[K-1] S K-1 K 1 S[K-1] = x.lower() S[K-1] S K-1 K 1 x.lower() x.lower x lower print("".join(S)) print "".join(S) "".join "" join S S = list(input()) list(input()) S x = S[K-1] S[K-1] x K = map(int,input().split()) map(int,input().split()) K N,K = map(int,input().split()) map(int,input().split()) N
N,K = map(int,input().split())
S = list(input())

x = S[K-1]
S[K-1] = x.lower()

print("".join(S))