nk = input().split()
index = int(nk[1]) -1
s = input()
c = 0
for i in s:
  if c == index: print(i.lower(),end="")
  else: print(i,end="")
  c+= 1 nk = input().split() nk input().split() ().split () input split index = int(nk[1]) -1 index int(nk[1]) -1 int(nk[1]) int nk[1] nk 1 1 s = input() s input() input c = 0 c 0 for i in s:
  if c == index: print(i.lower(),end="")
  else: print(i,end="")
  c+= 1 i s if c == index: print(i.lower(),end="")
  else: print(i,end="")
   c == index c index c+= 1 c 1 nk = input().split() input().split() nk s = input() input() s index = int(nk[1]) -1 int(nk[1]) -1 index c+= 1 1 c c = 0 0 c
nk = input().split()
index = int(nk[1]) -1
s = input()
c = 0
for i in s:
  if c == index: print(i.lower(),end="")
  else: print(i,end="")
  c+= 1