import java.util.*;
public class Main
{
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int loop = scan.nextInt();
        int array = scan.nextInt();
        String huruf = scan.next();
        String haraf = huruf.substring(array-1, array).toLowerCase();
        System.out.println(huruf.substring(0, array-1)+haraf+huruf.substring(array, loop));
    }
} import java.util.*; util.* java public class Main
{
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int loop = scan.nextInt();
        int array = scan.nextInt();
        String huruf = scan.next();
        String haraf = huruf.substring(array-1, array).toLowerCase();
        System.out.println(huruf.substring(0, array-1)+haraf+huruf.substring(array, loop));
    }
} Main public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int loop = scan.nextInt();
        int array = scan.nextInt();
        String huruf = scan.next();
        String haraf = huruf.substring(array-1, array).toLowerCase();
        System.out.println(huruf.substring(0, array-1)+haraf+huruf.substring(array, loop));
    } main {
        Scanner scan = new Scanner(System.in);
        int loop = scan.nextInt();
        int array = scan.nextInt();
        String huruf = scan.next();
        String haraf = huruf.substring(array-1, array).toLowerCase();
        System.out.println(huruf.substring(0, array-1)+haraf+huruf.substring(array, loop));
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int loop = scan.nextInt(); loop scan.nextInt() scan.nextInt scan int array = scan.nextInt(); array scan.nextInt() scan.nextInt scan String huruf = scan.next(); huruf scan.next() scan.next scan String haraf = huruf.substring(array-1, array).toLowerCase(); haraf huruf.substring(array-1, array).toLowerCase() huruf.substring(array-1, array).toLowerCase huruf.substring(array-1, array) huruf.substring huruf array-1 array 1 array System.out.println(huruf.substring(0, array-1)+haraf+huruf.substring(array, loop)) System.out.println System.out System System.out huruf.substring(0, array-1)+haraf+huruf.substring(array, loop) huruf.substring(0, array-1)+haraf+huruf.substring(array, loop) huruf.substring(0, array-1) huruf.substring huruf 0 array-1 array 1 haraf huruf.substring(array, loop) huruf.substring huruf array loop String[] args args public class Main
{
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int loop = scan.nextInt();
        int array = scan.nextInt();
        String huruf = scan.next();
        String haraf = huruf.substring(array-1, array).toLowerCase();
        System.out.println(huruf.substring(0, array-1)+haraf+huruf.substring(array, loop));
    }
} public class Main
{
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int loop = scan.nextInt();
        int array = scan.nextInt();
        String huruf = scan.next();
        String haraf = huruf.substring(array-1, array).toLowerCase();
        System.out.println(huruf.substring(0, array-1)+haraf+huruf.substring(array, loop));
    }
} Main
import java.util.*;
public class Main
{
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int loop = scan.nextInt();
        int array = scan.nextInt();
        String huruf = scan.next();
        String haraf = huruf.substring(array-1, array).toLowerCase();
        System.out.println(huruf.substring(0, array-1)+haraf+huruf.substring(array, loop));
    }
}
