import java.util.Scanner
object Main extends App {
  val sc = new Scanner(System.in)
  val n, k = sc.nextInt
  val s = sc.next
  val arr = s.toCharArray
  arr(k - 1) = (arr(k - 1) + 32).toChar
  println(arr.mkString)
}