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

k = k-1

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

k = k-1

for i in range(n):
  if i == k:
    x = s[i].lower()
    print(x,end="")
  else:
    print(s[i],end="")
