import math
def ip():return int(input())
def inp():return map(int,input().split())
def linp():return list(map(int,input().split()))

n,k=inp()
s=[x for x in input()]
s[k-1]=chr(ord(s[k-1])+32)
for x in s:print(x,end="") import math math def ip():return int(input()) ip def inp():return map(int,input().split()) inp def linp():return list(map(int,input().split())) linp n,k=inp() n inp() inp k x for x in input() for x in input() x input() input for x in input() x s=[x for x in input()] s [x for x in input()] s[k-1]=chr(ord(s[k-1])+32) s[k-1] s k-1 k 1 chr(ord(s[k-1])+32) chr ord(s[k-1])+32 ord(s[k-1]) ord s[k-1] s k-1 k 1 32 for x in s:print(x,end="") x s n,k=inp() inp() n s=[x for x in input()] [x for x in input()] s def linp():return list(map(int,input().split())) def linp():return list(map(int,input().split())) linp def ip():return int(input()) def ip():return int(input()) ip def inp():return map(int,input().split()) def inp():return map(int,input().split()) inp k=inp() inp() k
import math
def ip():return int(input())
def inp():return map(int,input().split())
def linp():return list(map(int,input().split()))

n,k=inp()
s=[x for x in input()]
s[k-1]=chr(ord(s[k-1])+32)
for x in s:print(x,end="")
