import java.util.Scanner;

public class Main {
    public static void main(String args[]){
        Scanner stdIn = new Scanner(System.in);
        //int a = stdIn.nextInt();
        //int b = stdIn.nextInt();
        int n = stdIn.nextInt();
        //int p = stdIn.nextInt();
        int k = stdIn.nextInt();
        String s = stdIn.next();
        String ss = s.toLowerCase();
        char sc[] = ss.toCharArray();
        char c[] = s.toCharArray();
        
        for(int i = 0; i < n; i++){
            if(i != k - 1){
                System.out.print(c[i]);
            }else{
                System.out.print(sc[i]);
            }
        }
        
        
        
        
        
        System.out.println();
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String args[]){
        Scanner stdIn = new Scanner(System.in);
        //int a = stdIn.nextInt();
        //int b = stdIn.nextInt();
        int n = stdIn.nextInt();
        //int p = stdIn.nextInt();
        int k = stdIn.nextInt();
        String s = stdIn.next();
        String ss = s.toLowerCase();
        char sc[] = ss.toCharArray();
        char c[] = s.toCharArray();
        
        for(int i = 0; i < n; i++){
            if(i != k - 1){
                System.out.print(c[i]);
            }else{
                System.out.print(sc[i]);
            }
        }
        
        
        
        
        
        System.out.println();
    }
} Main public static void main(String args[]){
        Scanner stdIn = new Scanner(System.in);
        //int a = stdIn.nextInt();
        //int b = stdIn.nextInt();
        int n = stdIn.nextInt();
        //int p = stdIn.nextInt();
        int k = stdIn.nextInt();
        String s = stdIn.next();
        String ss = s.toLowerCase();
        char sc[] = ss.toCharArray();
        char c[] = s.toCharArray();
        
        for(int i = 0; i < n; i++){
            if(i != k - 1){
                System.out.print(c[i]);
            }else{
                System.out.print(sc[i]);
            }
        }
        
        
        
        
        
        System.out.println();
    } main {
        Scanner stdIn = new Scanner(System.in);
        //int a = stdIn.nextInt();
        //int b = stdIn.nextInt();
        int n = stdIn.nextInt();
        //int p = stdIn.nextInt();
        int k = stdIn.nextInt();
        String s = stdIn.next();
        String ss = s.toLowerCase();
        char sc[] = ss.toCharArray();
        char c[] = s.toCharArray();
        
        for(int i = 0; i < n; i++){
            if(i != k - 1){
                System.out.print(c[i]);
            }else{
                System.out.print(sc[i]);
            }
        }
        
        
        
        
        
        System.out.println();
    } Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) int n = stdIn.nextInt(); n stdIn.nextInt() stdIn.nextInt stdIn int k = stdIn.nextInt(); k stdIn.nextInt() stdIn.nextInt stdIn String s = stdIn.next(); s stdIn.next() stdIn.next stdIn String ss = s.toLowerCase(); ss s.toLowerCase() s.toLowerCase s char sc[] = ss.toCharArray(); sc ss.toCharArray() ss.toCharArray ss char c[] = s.toCharArray(); c s.toCharArray() s.toCharArray s for(int i = 0; i < n; i++){
            if(i != k - 1){
                System.out.print(c[i]);
            }else{
                System.out.print(sc[i]);
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            if(i != k - 1){
                System.out.print(c[i]);
            }else{
                System.out.print(sc[i]);
            }
        } {
            if(i != k - 1){
                System.out.print(c[i]);
            }else{
                System.out.print(sc[i]);
            }
        } if(i != k - 1){
                System.out.print(c[i]);
            }else{
                System.out.print(sc[i]);
            } i != k - 1 i k - 1 k 1 {
                System.out.print(c[i]);
            } System.out.print(c[i]) System.out.print System.out System System.out c[i] c i {
                System.out.print(sc[i]);
            } System.out.print(sc[i]) System.out.print System.out System System.out sc[i] sc i System.out.println() System.out.println System.out System System.out String args[] args public class Main {
    public static void main(String args[]){
        Scanner stdIn = new Scanner(System.in);
        //int a = stdIn.nextInt();
        //int b = stdIn.nextInt();
        int n = stdIn.nextInt();
        //int p = stdIn.nextInt();
        int k = stdIn.nextInt();
        String s = stdIn.next();
        String ss = s.toLowerCase();
        char sc[] = ss.toCharArray();
        char c[] = s.toCharArray();
        
        for(int i = 0; i < n; i++){
            if(i != k - 1){
                System.out.print(c[i]);
            }else{
                System.out.print(sc[i]);
            }
        }
        
        
        
        
        
        System.out.println();
    }
} public class Main {
    public static void main(String args[]){
        Scanner stdIn = new Scanner(System.in);
        //int a = stdIn.nextInt();
        //int b = stdIn.nextInt();
        int n = stdIn.nextInt();
        //int p = stdIn.nextInt();
        int k = stdIn.nextInt();
        String s = stdIn.next();
        String ss = s.toLowerCase();
        char sc[] = ss.toCharArray();
        char c[] = s.toCharArray();
        
        for(int i = 0; i < n; i++){
            if(i != k - 1){
                System.out.print(c[i]);
            }else{
                System.out.print(sc[i]);
            }
        }
        
        
        
        
        
        System.out.println();
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String args[]){
        Scanner stdIn = new Scanner(System.in);
        //int a = stdIn.nextInt();
        //int b = stdIn.nextInt();
        int n = stdIn.nextInt();
        //int p = stdIn.nextInt();
        int k = stdIn.nextInt();
        String s = stdIn.next();
        String ss = s.toLowerCase();
        char sc[] = ss.toCharArray();
        char c[] = s.toCharArray();
        
        for(int i = 0; i < n; i++){
            if(i != k - 1){
                System.out.print(c[i]);
            }else{
                System.out.print(sc[i]);
            }
        }
        
        
        
        
        
        System.out.println();
    }
}
