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

after=str.lower(S[K-1])

ans = S[:K-1] + after + S[K:]
print(ans) N , K= list(map(int,input().split())) N list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split K S = input() S input() input after=str.lower(S[K-1]) after str.lower(S[K-1]) str.lower str lower S[K-1] S K-1 K 1 ans = S[:K-1] + after + S[K:] ans S[:K-1] + after + S[K:] S[:K-1] + after S[:K-1] S :K-1 K-1 K 1 after S[K:] S K: K print(ans) print ans N , K= list(map(int,input().split())) list(map(int,input().split())) N K= list(map(int,input().split())) list(map(int,input().split())) K after=str.lower(S[K-1]) str.lower(S[K-1]) after S = input() input() S ans = S[:K-1] + after + S[K:] S[:K-1] + after + S[K:] ans
N , K= list(map(int,input().split()))
S = input()

after=str.lower(S[K-1])

ans = S[:K-1] + after + S[K:]
print(ans)