a,b=map(int,input().split())
s=input()
inter = s[b-1]
inter_new = inter.lower()
res = ""
if b ==1:
  res = inter_new+s[1:len(s)]
elif b == a:
  res = s[0:len(s)-1]+inter_new
else:
  res = s[0:b-1]+inter_new+s[b:len(s)]
print(res) a,b=map(int,input().split()) a map(int,input().split()) map int input().split() ().split () input split b s=input() s input() input inter = s[b-1] inter s[b-1] s b-1 b 1 inter_new = inter.lower() inter_new inter.lower() inter.lower inter lower res = "" res "" if b ==1:
  res = inter_new+s[1:len(s)]
elif b == a:
  res = s[0:len(s)-1]+inter_new
else:
  res = s[0:b-1]+inter_new+s[b:len(s)] b ==1 b 1 res = inter_new+s[1:len(s)] res inter_new+s[1:len(s)] inter_new s[1:len(s)] s 1:len(s) 1 len(s) len s elif b == a:
  res = s[0:len(s)-1]+inter_new b == a b a res = s[0:len(s)-1]+inter_new res s[0:len(s)-1]+inter_new s[0:len(s)-1] s 0:len(s)-1 0 len(s)-1 len(s) len s 1 inter_new res = s[0:b-1]+inter_new+s[b:len(s)] res s[0:b-1]+inter_new+s[b:len(s)] s[0:b-1]+inter_new s[0:b-1] s 0:b-1 0 b-1 b 1 inter_new s[b:len(s)] s b:len(s) b len(s) len s print(res) print res s=input() input() s res = "" "" res res = s[0:len(s)-1]+inter_new s[0:len(s)-1]+inter_new res res = s[0:b-1]+inter_new+s[b:len(s)] s[0:b-1]+inter_new+s[b:len(s)] res b=map(int,input().split()) map(int,input().split()) b a,b=map(int,input().split()) map(int,input().split()) a inter_new = inter.lower() inter.lower() inter_new res = inter_new+s[1:len(s)] inter_new+s[1:len(s)] res inter = s[b-1] s[b-1] inter
a,b=map(int,input().split())
s=input()
inter = s[b-1]
inter_new = inter.lower()
res = ""
if b ==1:
  res = inter_new+s[1:len(s)]
elif b == a:
  res = s[0:len(s)-1]+inter_new
else:
  res = s[0:b-1]+inter_new+s[b:len(s)]
print(res)