import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        // write your code here
        Scanner scan = new Scanner(System.in);
        String str1 = scan.nextLine();
        String str2 = scan.nextLine();
        scan.close();
        String[] str = str1.split(" ");
        int a = Integer.parseInt(str[0]);
        int b = Integer.parseInt(str[1]);

        StringBuffer answer = new StringBuffer();
        for (int i = 0; i < a; i++) {
            if (i == b-1){
                String temp = String.valueOf(str2.charAt(i));
                answer.append(temp.toLowerCase());
            } else {
                answer.append(str2.charAt(i));

            }
        }
        System.out.println(answer);

        }

    } import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        // write your code here
        Scanner scan = new Scanner(System.in);
        String str1 = scan.nextLine();
        String str2 = scan.nextLine();
        scan.close();
        String[] str = str1.split(" ");
        int a = Integer.parseInt(str[0]);
        int b = Integer.parseInt(str[1]);

        StringBuffer answer = new StringBuffer();
        for (int i = 0; i < a; i++) {
            if (i == b-1){
                String temp = String.valueOf(str2.charAt(i));
                answer.append(temp.toLowerCase());
            } else {
                answer.append(str2.charAt(i));

            }
        }
        System.out.println(answer);

        }

    } Main public static void main(String[] args) {
        // write your code here
        Scanner scan = new Scanner(System.in);
        String str1 = scan.nextLine();
        String str2 = scan.nextLine();
        scan.close();
        String[] str = str1.split(" ");
        int a = Integer.parseInt(str[0]);
        int b = Integer.parseInt(str[1]);

        StringBuffer answer = new StringBuffer();
        for (int i = 0; i < a; i++) {
            if (i == b-1){
                String temp = String.valueOf(str2.charAt(i));
                answer.append(temp.toLowerCase());
            } else {
                answer.append(str2.charAt(i));

            }
        }
        System.out.println(answer);

        } main {
        // write your code here
        Scanner scan = new Scanner(System.in);
        String str1 = scan.nextLine();
        String str2 = scan.nextLine();
        scan.close();
        String[] str = str1.split(" ");
        int a = Integer.parseInt(str[0]);
        int b = Integer.parseInt(str[1]);

        StringBuffer answer = new StringBuffer();
        for (int i = 0; i < a; i++) {
            if (i == b-1){
                String temp = String.valueOf(str2.charAt(i));
                answer.append(temp.toLowerCase());
            } else {
                answer.append(str2.charAt(i));

            }
        }
        System.out.println(answer);

        } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String str1 = scan.nextLine(); str1 scan.nextLine() scan.nextLine scan String str2 = scan.nextLine(); str2 scan.nextLine() scan.nextLine scan scan.close() scan.close scan String[] str = str1.split(" "); str str1.split(" ") str1.split str1 " " int a = Integer.parseInt(str[0]); a Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 int b = Integer.parseInt(str[1]); b Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 StringBuffer answer = new StringBuffer(); answer new StringBuffer() for (int i = 0; i < a; i++) {
            if (i == b-1){
                String temp = String.valueOf(str2.charAt(i));
                answer.append(temp.toLowerCase());
            } else {
                answer.append(str2.charAt(i));

            }
        } int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
            if (i == b-1){
                String temp = String.valueOf(str2.charAt(i));
                answer.append(temp.toLowerCase());
            } else {
                answer.append(str2.charAt(i));

            }
        } {
            if (i == b-1){
                String temp = String.valueOf(str2.charAt(i));
                answer.append(temp.toLowerCase());
            } else {
                answer.append(str2.charAt(i));

            }
        } if (i == b-1){
                String temp = String.valueOf(str2.charAt(i));
                answer.append(temp.toLowerCase());
            } else {
                answer.append(str2.charAt(i));

            } i == b-1 i b-1 b 1 {
                String temp = String.valueOf(str2.charAt(i));
                answer.append(temp.toLowerCase());
            } String temp = String.valueOf(str2.charAt(i)); temp String.valueOf(str2.charAt(i)) String.valueOf String str2.charAt(i) str2.charAt str2 i answer.append(temp.toLowerCase()) answer.append answer temp.toLowerCase() temp.toLowerCase temp {
                answer.append(str2.charAt(i));

            } answer.append(str2.charAt(i)) answer.append answer str2.charAt(i) str2.charAt str2 i System.out.println(answer) System.out.println System.out System System.out answer String[] args args public class Main {

    public static void main(String[] args) {
        // write your code here
        Scanner scan = new Scanner(System.in);
        String str1 = scan.nextLine();
        String str2 = scan.nextLine();
        scan.close();
        String[] str = str1.split(" ");
        int a = Integer.parseInt(str[0]);
        int b = Integer.parseInt(str[1]);

        StringBuffer answer = new StringBuffer();
        for (int i = 0; i < a; i++) {
            if (i == b-1){
                String temp = String.valueOf(str2.charAt(i));
                answer.append(temp.toLowerCase());
            } else {
                answer.append(str2.charAt(i));

            }
        }
        System.out.println(answer);

        }

    } public class Main {

    public static void main(String[] args) {
        // write your code here
        Scanner scan = new Scanner(System.in);
        String str1 = scan.nextLine();
        String str2 = scan.nextLine();
        scan.close();
        String[] str = str1.split(" ");
        int a = Integer.parseInt(str[0]);
        int b = Integer.parseInt(str[1]);

        StringBuffer answer = new StringBuffer();
        for (int i = 0; i < a; i++) {
            if (i == b-1){
                String temp = String.valueOf(str2.charAt(i));
                answer.append(temp.toLowerCase());
            } else {
                answer.append(str2.charAt(i));

            }
        }
        System.out.println(answer);

        }

    } Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        // write your code here
        Scanner scan = new Scanner(System.in);
        String str1 = scan.nextLine();
        String str2 = scan.nextLine();
        scan.close();
        String[] str = str1.split(" ");
        int a = Integer.parseInt(str[0]);
        int b = Integer.parseInt(str[1]);

        StringBuffer answer = new StringBuffer();
        for (int i = 0; i < a; i++) {
            if (i == b-1){
                String temp = String.valueOf(str2.charAt(i));
                answer.append(temp.toLowerCase());
            } else {
                answer.append(str2.charAt(i));

            }
        }
        System.out.println(answer);

        }

    }
