n, k = map(int, input().split())

s = input()

for i in range(n):

  if i == k-1:

    print(s[i].lower(),end="")

  else:

    print(s[i],end="")

n, k = list(map(int, input().split()))

s = eval(input())

print((s[:k-1]+s[k-1].lower()+s[k:]))
n, k = map(int, input().split())
s = input()
for i in range(n):
    if i == k - 1:
        print(s[i].lower(), end="")
    else:
        print(s[i], end="")

n, k = list(map(int, input().split()))
s = eval(input())
print((s[: k - 1] + s[k - 1].lower() + s[k:]))

-n, k = map(int, input().split()) -s = input() -for i in range(n): -    if i == k - 1: -        print(s[i].lower(), end="") -    else: -        print(s[i], end="") +n, k = list(map(int, input().split())) +s = eval(input()) +print((s[: k - 1] + s[k - 1].lower() + s[k:]))