'use strict'

function main(input) {
  var hoge = input.split('\n')
  const n = ~~hoge[0].split(' ')[0]
  const k = ~~hoge[0].split(' ')[1]
  var str = hoge[1].split('')
  str[k - 1] = str[k - 1].toLocaleLowerCase()

  console.log(str.join(''))
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'))
