#!/usr/bin/env python

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

kmj = chr(ord(S[K-1])+32)

T = ""
for i in range(N):
    if i == K-1:
        T+=kmj
    else :
        T+=S[i]

print(T) 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 kmj = chr(ord(S[K-1])+32) kmj chr(ord(S[K-1])+32) chr ord(S[K-1])+32 ord(S[K-1]) ord S[K-1] S K-1 K 1 32 T = "" T "" for i in range(N):
    if i == K-1:
        T+=kmj
    else :
        T+=S[i] i range(N) range N if i == K-1:
        T+=kmj
    else :
        T+=S[i] i == K-1 i K-1 K 1 T+=kmj T kmj T+=S[i] T S[i] S i print(T) print T T = "" "" T N,K = list(map(int, input().split())) list(map(int, input().split())) N T+=S[i] S[i] T S = input() input() S K = list(map(int, input().split())) list(map(int, input().split())) K T+=kmj kmj T kmj = chr(ord(S[K-1])+32) chr(ord(S[K-1])+32) kmj
#!/usr/bin/env python

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

kmj = chr(ord(S[K-1])+32)

T = ""
for i in range(N):
    if i == K-1:
        T+=kmj
    else :
        T+=S[i]

print(T)