import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        String[] in = s.nextLine().split(" ");
        int where = Integer.parseInt(in[1])-1;
        String t = s.nextLine();
        String r = "";
        int i=0;
        for(char c:t.toCharArray()){
            if(i == where){
                r += String.valueOf(c).toLowerCase();
            }else {
                r += c;
            }
            i++;
        }
        System.out.println(r);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        String[] in = s.nextLine().split(" ");
        int where = Integer.parseInt(in[1])-1;
        String t = s.nextLine();
        String r = "";
        int i=0;
        for(char c:t.toCharArray()){
            if(i == where){
                r += String.valueOf(c).toLowerCase();
            }else {
                r += c;
            }
            i++;
        }
        System.out.println(r);
    }
} Main public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        String[] in = s.nextLine().split(" ");
        int where = Integer.parseInt(in[1])-1;
        String t = s.nextLine();
        String r = "";
        int i=0;
        for(char c:t.toCharArray()){
            if(i == where){
                r += String.valueOf(c).toLowerCase();
            }else {
                r += c;
            }
            i++;
        }
        System.out.println(r);
    } main {
        Scanner s = new Scanner(System.in);
        String[] in = s.nextLine().split(" ");
        int where = Integer.parseInt(in[1])-1;
        String t = s.nextLine();
        String r = "";
        int i=0;
        for(char c:t.toCharArray()){
            if(i == where){
                r += String.valueOf(c).toLowerCase();
            }else {
                r += c;
            }
            i++;
        }
        System.out.println(r);
    } Scanner s = new Scanner(System.in); s new Scanner(System.in) String[] in = s.nextLine().split(" "); in s.nextLine().split(" ") s.nextLine().split s.nextLine() s.nextLine s " " int where = Integer.parseInt(in[1])-1; where Integer.parseInt(in[1])-1 Integer.parseInt(in[1]) Integer.parseInt Integer in[1] in 1 1 String t = s.nextLine(); t s.nextLine() s.nextLine s String r = ""; r "" int i=0; i 0 for(char c:t.toCharArray()){
            if(i == where){
                r += String.valueOf(c).toLowerCase();
            }else {
                r += c;
            }
            i++;
        } char c t.toCharArray() t.toCharArray t {
            if(i == where){
                r += String.valueOf(c).toLowerCase();
            }else {
                r += c;
            }
            i++;
        } {
            if(i == where){
                r += String.valueOf(c).toLowerCase();
            }else {
                r += c;
            }
            i++;
        } if(i == where){
                r += String.valueOf(c).toLowerCase();
            }else {
                r += c;
            } i == where i where {
                r += String.valueOf(c).toLowerCase();
            } r += String.valueOf(c).toLowerCase() r String.valueOf(c).toLowerCase() String.valueOf(c).toLowerCase String.valueOf(c) String.valueOf String c {
                r += c;
            } r += c r c i++ i System.out.println(r) System.out.println System.out System System.out r String[] args args public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        String[] in = s.nextLine().split(" ");
        int where = Integer.parseInt(in[1])-1;
        String t = s.nextLine();
        String r = "";
        int i=0;
        for(char c:t.toCharArray()){
            if(i == where){
                r += String.valueOf(c).toLowerCase();
            }else {
                r += c;
            }
            i++;
        }
        System.out.println(r);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        String[] in = s.nextLine().split(" ");
        int where = Integer.parseInt(in[1])-1;
        String t = s.nextLine();
        String r = "";
        int i=0;
        for(char c:t.toCharArray()){
            if(i == where){
                r += String.valueOf(c).toLowerCase();
            }else {
                r += c;
            }
            i++;
        }
        System.out.println(r);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        String[] in = s.nextLine().split(" ");
        int where = Integer.parseInt(in[1])-1;
        String t = s.nextLine();
        String r = "";
        int i=0;
        for(char c:t.toCharArray()){
            if(i == where){
                r += String.valueOf(c).toLowerCase();
            }else {
                r += c;
            }
            i++;
        }
        System.out.println(r);
    }
}