import java.util.*;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        String S = sc.next();

        for(int i=0;i<N;i++){
            String s = S.substring(i,i+1);
            if(i == K-1){
                System.out.print(s.toLowerCase());
            } else {
                System.out.print(s);
            }
        }




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

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        String S = sc.next();

        for(int i=0;i<N;i++){
            String s = S.substring(i,i+1);
            if(i == K-1){
                System.out.print(s.toLowerCase());
            } else {
                System.out.print(s);
            }
        }




    }
} Main public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        String S = sc.next();

        for(int i=0;i<N;i++){
            String s = S.substring(i,i+1);
            if(i == K-1){
                System.out.print(s.toLowerCase());
            } else {
                System.out.print(s);
            }
        }




    } main {

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        String S = sc.next();

        for(int i=0;i<N;i++){
            String s = S.substring(i,i+1);
            if(i == K-1){
                System.out.print(s.toLowerCase());
            } else {
                System.out.print(s);
            }
        }




    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int K = sc.nextInt(); K sc.nextInt() sc.nextInt sc String S = sc.next(); S sc.next() sc.next sc for(int i=0;i<N;i++){
            String s = S.substring(i,i+1);
            if(i == K-1){
                System.out.print(s.toLowerCase());
            } else {
                System.out.print(s);
            }
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            String s = S.substring(i,i+1);
            if(i == K-1){
                System.out.print(s.toLowerCase());
            } else {
                System.out.print(s);
            }
        } {
            String s = S.substring(i,i+1);
            if(i == K-1){
                System.out.print(s.toLowerCase());
            } else {
                System.out.print(s);
            }
        } String s = S.substring(i,i+1); s S.substring(i,i+1) S.substring S i i+1 i 1 if(i == K-1){
                System.out.print(s.toLowerCase());
            } else {
                System.out.print(s);
            } i == K-1 i K-1 K 1 {
                System.out.print(s.toLowerCase());
            } System.out.print(s.toLowerCase()) System.out.print System.out System System.out s.toLowerCase() s.toLowerCase s {
                System.out.print(s);
            } System.out.print(s) System.out.print System.out System System.out s String[] args args public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        String S = sc.next();

        for(int i=0;i<N;i++){
            String s = S.substring(i,i+1);
            if(i == K-1){
                System.out.print(s.toLowerCase());
            } else {
                System.out.print(s);
            }
        }




    }
} public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        String S = sc.next();

        for(int i=0;i<N;i++){
            String s = S.substring(i,i+1);
            if(i == K-1){
                System.out.print(s.toLowerCase());
            } else {
                System.out.print(s);
            }
        }




    }
} Main
import java.util.*;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        String S = sc.next();

        for(int i=0;i<N;i++){
            String s = S.substring(i,i+1);
            if(i == K-1){
                System.out.print(s.toLowerCase());
            } else {
                System.out.print(s);
            }
        }




    }
}
