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

s = eval(input())



if s[K - 1] == 'A':

    t = 'a'

elif s[K - 1] == 'B':

    t = 'b'

else:

    t = 'c'



print((s[:K - 1] + t + s[K:]))

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

s = eval(input())



res = ''

for i, ss in enumerate(s, 1):

    if i != K:

        res += ss

    else:

        res += ss.lower()

print(res)

N, K = list(map(int, input().split()))
s = eval(input())
if s[K - 1] == "A":
    t = "a"
elif s[K - 1] == "B":
    t = "b"
else:
    t = "c"
print((s[: K - 1] + t + s[K:]))

N, K = list(map(int, input().split()))
s = eval(input())
res = ""
for i, ss in enumerate(s, 1):
    if i != K:
        res += ss
    else:
        res += ss.lower()
print(res)

-if s[K - 1] == "A": -    t = "a" -elif s[K - 1] == "B": -    t = "b" -else: -    t = "c" -print((s[: K - 1] + t + s[K:])) +res = "" +for i, ss in enumerate(s, 1): +    if i != K: +        res += ss +    else: +        res += ss.lower() +print(res)