import sys
a=sys.stdin.readline()
res = [int(i) for i in a.split() if i.isdigit()] 
N,K = [res[i] for i in (0,1)]
S=sys.stdin.readline(N)
K-=1
if N<0 or N>50:
  print("Error")
else:
  x=S[:K]
  y=S[K].lower()
  z=S[K+1:]
  print(x+y+z) import sys sys a=sys.stdin.readline() a sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline int(i) for i in a.split() if i.isdigit() for i in a.split() if i.isdigit() i a.split() a.split a split i.isdigit() i.isdigit i isdigit if i.isdigit() int(i) int i res = [int(i) for i in a.split() if i.isdigit()] res [int(i) for i in a.split() if i.isdigit()] res[i] for i in (0,1) for i in (0,1) i (0,1) 0 1 for i in (0,1) res[i] res i N,K = [res[i] for i in (0,1)] N [res[i] for i in (0,1)] K S=sys.stdin.readline(N) S sys.stdin.readline(N) sys.stdin.readline sys.stdin sys stdin readline N K-=1 K 1 if N<0 or N>50:
  print("Error")
else:
  x=S[:K]
  y=S[K].lower()
  z=S[K+1:]
  print(x+y+z) N<0 or N>50 N<0 N 0 N>50 N 50 print("Error") print "Error" x=S[:K] x S[:K] S :K K y=S[K].lower() y S[K].lower() [K].lower [K] S K lower z=S[K+1:] z S[K+1:] S K+1: K+1 K 1 print(x+y+z) print x+y+z x+y x y z z=S[K+1:] S[K+1:] z a=sys.stdin.readline() sys.stdin.readline() a x=S[:K] S[:K] x res = [int(i) for i in a.split() if i.isdigit()] [int(i) for i in a.split() if i.isdigit()] res K-=1 1 K S=sys.stdin.readline(N) sys.stdin.readline(N) S K = [res[i] for i in (0,1)] [res[i] for i in (0,1)] K N,K = [res[i] for i in (0,1)] [res[i] for i in (0,1)] N y=S[K].lower() S[K].lower() y
import sys
a=sys.stdin.readline()
res = [int(i) for i in a.split() if i.isdigit()] 
N,K = [res[i] for i in (0,1)]
S=sys.stdin.readline(N)
K-=1
if N<0 or N>50:
  print("Error")
else:
  x=S[:K]
  y=S[K].lower()
  z=S[K+1:]
  print(x+y+z)