x = [list(map(str, input().split())) for i in range(2)]
a = int(x[0][0])
b = int(x[0][1])
s = x[1][0]
l = []
for i in range(a):
  l += s[i]
l[b-1] = l[b-1].lower()
my_result = l[0]
for i in range(1,a):
  my_result += l[i]
print(str(my_result)) list(map(str, input().split())) for i in range(2) for i in range(2) i range(2) range 2 for i in range(2) list(map(str, input().split())) list map(str, input().split()) map str input().split() ().split () input split x = [list(map(str, input().split())) for i in range(2)] x [list(map(str, input().split())) for i in range(2)] a = int(x[0][0]) a int(x[0][0]) int x[0][0] [0] x 0 0 b = int(x[0][1]) b int(x[0][1]) int x[0][1] [0] x 0 1 s = x[1][0] s x[1][0] [1] x 1 0 l = [] l [] for i in range(a):
  l += s[i] i range(a) range a l += s[i] l s[i] s i l[b-1] = l[b-1].lower() l[b-1] l b-1 b 1 l[b-1].lower() [b-1].lower [b-1] l b-1 b 1 lower my_result = l[0] my_result l[0] l 0 for i in range(1,a):
  my_result += l[i] i range(1,a) range 1 a my_result += l[i] my_result l[i] l i print(str(my_result)) print str(my_result) str my_result s = x[1][0] x[1][0] s b = int(x[0][1]) int(x[0][1]) b my_result = l[0] l[0] my_result a = int(x[0][0]) int(x[0][0]) a l = [] [] l x = [list(map(str, input().split())) for i in range(2)] [list(map(str, input().split())) for i in range(2)] x l += s[i] s[i] l my_result += l[i] l[i] my_result
x = [list(map(str, input().split())) for i in range(2)]
a = int(x[0][0])
b = int(x[0][1])
s = x[1][0]
l = []
for i in range(a):
  l += s[i]
l[b-1] = l[b-1].lower()
my_result = l[0]
for i in range(1,a):
  my_result += l[i]
print(str(my_result))