function Main(input) {
    var result;
    const N = parseInt(input[0])
    const K = parseInt(input[1])
    var S = input[2];    
    
    var c = S.charAt(K-1);
    switch(c) {
        case "A": c = "a"; break;
        case "B": c = "b"; break;
        case "C": c = "c"; break;

    }
    if(K < N) {
        console.log(S.substring(0, K-1) + c + S.substring(K, N - K + 1));
    }else {
        console.log(S.substring(0, K-1) + c);
    }
}

// 1行入力の場合
// Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());

// 改行で分割
// Main(require("fs").readFileSync("/dev/stdin", "utf8").trim().split(/\n/));

// 改行・空白で分割
Main(require("fs").readFileSync("/dev/stdin", "utf8").trim().split(/\n|\s/));