"use strict"

const arg_str = require('fs').readFileSync('/dev/stdin', 'UTF-8')
const arg_str_array = arg_str.split('\n')
const arg_str_line1 = arg_str_array[0]
const arg_str_line2 = arg_str_array[1]
const arg_str_line1_array = arg_str_line1.split(' ')

const n = arg_str_line1_array[0]
const k = arg_str_line1_array[1]
const target_str = arg_str_line2

let return_val = target_str

if(n != target_str.length){
  return return_val
}

if(0 < k && k <= n){
  return_val = `${target_str.slice(0, k-1)}${target_str.slice(k-1, k).toLowerCase()}${target_str.slice(k)}`
}

console.log(return_val)