
function Main(input) {
    var N = parseInt(input[0], 10);
    var K = parseInt(input[1], 10);
    var S = input[2];

    var mozi = S.charAt(K - 1);
    var result = '';

    for (var i=0; i<N; i++) {
        if (i + 1 === K) {
            if (mozi === 'A') {
                result += 'a'
            } else if (mozi === 'B') {
                result += 'b'
            } else if (mozi === 'C') {
                result += 'c'
            }
        } else {
            result += S.charAt(i);
        }
    }

    console.log(result);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8").trim().split(/\n|\s/));