"use strict"
function main(arg) {
    const   text = arg.trim().split("\n")[1].split(""),
            column = arg.trim().split("\n")[0].split(" ")[1],
            processing = text[column].toLowerCase(),
            an =[];
    for(var i = 0; i <= text.length; i++){
        if(i == column){an.push(processing);}else{an.push(text[i]);}
    };
    var result = an.join('');
    console.log(result);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));