a, b = list(map(int, input().split()))

c = eval(input())

d = ""

for i in range(len(c)):

    if i + 1 == b:

        d += c[i].lower()

    else:

        d += c[i]

print(d)

a, b = list(map(int, input().split()))

c = eval(input())

d = ""

for i in range(a):

    if i == b-1:

        d += c[i].lower()

    else:

        d += c[i]

print(d)

a, b = list(map(int, input().split()))
c = eval(input())
d = ""
for i in range(len(c)):
    if i + 1 == b:
        d += c[i].lower()
    else:
        d += c[i]
print(d)

a, b = list(map(int, input().split()))
c = eval(input())
d = ""
for i in range(a):
    if i == b - 1:
        d += c[i].lower()
    else:
        d += c[i]
print(d)

-for i in range(len(c)): -    if i + 1 == b: +for i in range(a): +    if i == b - 1: