a, b = map(int, input().split())
s = list(input())
s[b-1] = s[b-1].lower()

t = ""
for i in range(a):
  t += s[i]
  
print(t) a, b = map(int, input().split()) a map(int, input().split()) map int input().split() ().split () input split b s = list(input()) s list(input()) list input() input s[b-1] = s[b-1].lower() s[b-1] s b-1 b 1 s[b-1].lower() [b-1].lower [b-1] s b-1 b 1 lower t = "" t "" for i in range(a):
  t += s[i]
   i range(a) range a t += s[i] t s[i] s i print(t) print t t += s[i] s[i] t b = map(int, input().split()) map(int, input().split()) b s = list(input()) list(input()) s a, b = map(int, input().split()) map(int, input().split()) a t = "" "" t
a, b = map(int, input().split())
s = list(input())
s[b-1] = s[b-1].lower()

t = ""
for i in range(a):
  t += s[i]
  
print(t)