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();
        char[]ss = S.toCharArray();

            if(ss[K-1]=='A'){
                ss[K-1]='a';
                System.out.println(String.valueOf(ss)); 
            }else if(ss[K-1]=='B'){
                 ss[K-1]='b';
                System.out.println(String.valueOf(ss)); 
            }else{
                 ss[K-1]='c';
                System.out.println(String.valueOf(ss));            
            }
 	    }
} 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();
        char[]ss = S.toCharArray();

            if(ss[K-1]=='A'){
                ss[K-1]='a';
                System.out.println(String.valueOf(ss)); 
            }else if(ss[K-1]=='B'){
                 ss[K-1]='b';
                System.out.println(String.valueOf(ss)); 
            }else{
                 ss[K-1]='c';
                System.out.println(String.valueOf(ss));            
            }
 	    }
} 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();
        char[]ss = S.toCharArray();

            if(ss[K-1]=='A'){
                ss[K-1]='a';
                System.out.println(String.valueOf(ss)); 
            }else if(ss[K-1]=='B'){
                 ss[K-1]='b';
                System.out.println(String.valueOf(ss)); 
            }else{
                 ss[K-1]='c';
                System.out.println(String.valueOf(ss));            
            }
 	    } main {
    
    Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        String S = sc.next();
        char[]ss = S.toCharArray();

            if(ss[K-1]=='A'){
                ss[K-1]='a';
                System.out.println(String.valueOf(ss)); 
            }else if(ss[K-1]=='B'){
                 ss[K-1]='b';
                System.out.println(String.valueOf(ss)); 
            }else{
                 ss[K-1]='c';
                System.out.println(String.valueOf(ss));            
            }
 	    } 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 char[]ss = S.toCharArray(); ss S.toCharArray() S.toCharArray S if(ss[K-1]=='A'){
                ss[K-1]='a';
                System.out.println(String.valueOf(ss)); 
            }else if(ss[K-1]=='B'){
                 ss[K-1]='b';
                System.out.println(String.valueOf(ss)); 
            }else{
                 ss[K-1]='c';
                System.out.println(String.valueOf(ss));            
            } ss[K-1]=='A' ss[K-1] ss K-1 K 1 'A' {
                ss[K-1]='a';
                System.out.println(String.valueOf(ss)); 
            } ss[K-1]='a' ss[K-1] ss K-1 K 1 'a' System.out.println(String.valueOf(ss)) System.out.println System.out System System.out String.valueOf(ss) String.valueOf String ss if(ss[K-1]=='B'){
                 ss[K-1]='b';
                System.out.println(String.valueOf(ss)); 
            }else{
                 ss[K-1]='c';
                System.out.println(String.valueOf(ss));            
            } ss[K-1]=='B' ss[K-1] ss K-1 K 1 'B' {
                 ss[K-1]='b';
                System.out.println(String.valueOf(ss)); 
            } ss[K-1]='b' ss[K-1] ss K-1 K 1 'b' System.out.println(String.valueOf(ss)) System.out.println System.out System System.out String.valueOf(ss) String.valueOf String ss {
                 ss[K-1]='c';
                System.out.println(String.valueOf(ss));            
            } ss[K-1]='c' ss[K-1] ss K-1 K 1 'c' System.out.println(String.valueOf(ss)) System.out.println System.out System System.out String.valueOf(ss) String.valueOf String ss 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();
        char[]ss = S.toCharArray();

            if(ss[K-1]=='A'){
                ss[K-1]='a';
                System.out.println(String.valueOf(ss)); 
            }else if(ss[K-1]=='B'){
                 ss[K-1]='b';
                System.out.println(String.valueOf(ss)); 
            }else{
                 ss[K-1]='c';
                System.out.println(String.valueOf(ss));            
            }
 	    }
} 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();
        char[]ss = S.toCharArray();

            if(ss[K-1]=='A'){
                ss[K-1]='a';
                System.out.println(String.valueOf(ss)); 
            }else if(ss[K-1]=='B'){
                 ss[K-1]='b';
                System.out.println(String.valueOf(ss)); 
            }else{
                 ss[K-1]='c';
                System.out.println(String.valueOf(ss));            
            }
 	    }
} 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();
        char[]ss = S.toCharArray();

            if(ss[K-1]=='A'){
                ss[K-1]='a';
                System.out.println(String.valueOf(ss)); 
            }else if(ss[K-1]=='B'){
                 ss[K-1]='b';
                System.out.println(String.valueOf(ss)); 
            }else{
                 ss[K-1]='c';
                System.out.println(String.valueOf(ss));            
            }
 	    }
}
