import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int con = Integer.parseInt(in.nextLine().split(" ")[1]) - 1;
        String str = in.nextLine();
        in.close();
        char c = (char) (str.charAt(con) + 32);
        String ans = str.substring(0, con) + String.valueOf(c) + str.substring(con + 1);
        System.out.println(ans);
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int con = Integer.parseInt(in.nextLine().split(" ")[1]) - 1;
        String str = in.nextLine();
        in.close();
        char c = (char) (str.charAt(con) + 32);
        String ans = str.substring(0, con) + String.valueOf(c) + str.substring(con + 1);
        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int con = Integer.parseInt(in.nextLine().split(" ")[1]) - 1;
        String str = in.nextLine();
        in.close();
        char c = (char) (str.charAt(con) + 32);
        String ans = str.substring(0, con) + String.valueOf(c) + str.substring(con + 1);
        System.out.println(ans);
    } main {
        Scanner in = new Scanner(System.in);
        int con = Integer.parseInt(in.nextLine().split(" ")[1]) - 1;
        String str = in.nextLine();
        in.close();
        char c = (char) (str.charAt(con) + 32);
        String ans = str.substring(0, con) + String.valueOf(c) + str.substring(con + 1);
        System.out.println(ans);
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) int con = Integer.parseInt(in.nextLine().split(" ")[1]) - 1; con Integer.parseInt(in.nextLine().split(" ")[1]) - 1 Integer.parseInt(in.nextLine().split(" ")[1]) Integer.parseInt Integer in.nextLine().split(" ")[1] in.nextLine().split(" ") in.nextLine().split in.nextLine() in.nextLine in " " 1 1 String str = in.nextLine(); str in.nextLine() in.nextLine in in.close() in.close in char c = (char) (str.charAt(con) + 32); c (char) (str.charAt(con) + 32) str.charAt(con) str.charAt str con 32 String ans = str.substring(0, con) + String.valueOf(c) + str.substring(con + 1); ans str.substring(0, con) + String.valueOf(c) + str.substring(con + 1) str.substring(0, con) + String.valueOf(c) + str.substring(con + 1) str.substring(0, con) str.substring str 0 con String.valueOf(c) String.valueOf String c str.substring(con + 1) str.substring str con + 1 con 1 System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int con = Integer.parseInt(in.nextLine().split(" ")[1]) - 1;
        String str = in.nextLine();
        in.close();
        char c = (char) (str.charAt(con) + 32);
        String ans = str.substring(0, con) + String.valueOf(c) + str.substring(con + 1);
        System.out.println(ans);
    }
} public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int con = Integer.parseInt(in.nextLine().split(" ")[1]) - 1;
        String str = in.nextLine();
        in.close();
        char c = (char) (str.charAt(con) + 32);
        String ans = str.substring(0, con) + String.valueOf(c) + str.substring(con + 1);
        System.out.println(ans);
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int con = Integer.parseInt(in.nextLine().split(" ")[1]) - 1;
        String str = in.nextLine();
        in.close();
        char c = (char) (str.charAt(con) + 32);
        String ans = str.substring(0, con) + String.valueOf(c) + str.substring(con + 1);
        System.out.println(ans);
    }
}