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

k -= 1

for i in range(n):
  print(s[i] if i != k else s[i].lower(), 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 -= 1 k 1 for i in range(n):
  print(s[i] if i != k else s[i].lower(), end="") i range(n) range n print(s[i] if i != k else s[i].lower(), end="") print s[i] if i != k else s[i].lower() i != k i k s[i] s i s[i].lower() [i].lower [i] s i lower end="" end "" k = map(int, input().split()) map(int, input().split()) k s = input() input() s n, k = map(int, input().split()) map(int, input().split()) n k -= 1 1 k
n, k = map(int, input().split())
s = input()

k -= 1

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