import std.stdio, std.algorithm, std.array, std.range, std.string, std.conv, std.uni;

void main() {
    long n, k;
    readf("%d %d\n", &n, &k);
    k--;
    auto s = readln.strip;

    writeln(s[0..k] ~ s[k..k+1].toLower ~ s[k+1..$]);
}
