import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner scanner = new Scanner(System.in);
        
        int N = scanner.nextInt();
        int K = scanner.nextInt();
        
        String S = null;
        
        S = scanner.next();
        
        int count;
        String small = "";
        
        for(count=0 ; count < S.length() ; count++){
            if(count == K - 1){
                small += String.valueOf(S.charAt(count)).toLowerCase();
            }else{
                small += String.valueOf(S.charAt(count));
            }
        }
        
        System.out.println(small);
        
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner scanner = new Scanner(System.in);
        
        int N = scanner.nextInt();
        int K = scanner.nextInt();
        
        String S = null;
        
        S = scanner.next();
        
        int count;
        String small = "";
        
        for(count=0 ; count < S.length() ; count++){
            if(count == K - 1){
                small += String.valueOf(S.charAt(count)).toLowerCase();
            }else{
                small += String.valueOf(S.charAt(count));
            }
        }
        
        System.out.println(small);
        
    }
} Main public static void main(String[] args) throws Exception {
        Scanner scanner = new Scanner(System.in);
        
        int N = scanner.nextInt();
        int K = scanner.nextInt();
        
        String S = null;
        
        S = scanner.next();
        
        int count;
        String small = "";
        
        for(count=0 ; count < S.length() ; count++){
            if(count == K - 1){
                small += String.valueOf(S.charAt(count)).toLowerCase();
            }else{
                small += String.valueOf(S.charAt(count));
            }
        }
        
        System.out.println(small);
        
    } main {
        Scanner scanner = new Scanner(System.in);
        
        int N = scanner.nextInt();
        int K = scanner.nextInt();
        
        String S = null;
        
        S = scanner.next();
        
        int count;
        String small = "";
        
        for(count=0 ; count < S.length() ; count++){
            if(count == K - 1){
                small += String.valueOf(S.charAt(count)).toLowerCase();
            }else{
                small += String.valueOf(S.charAt(count));
            }
        }
        
        System.out.println(small);
        
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner int K = scanner.nextInt(); K scanner.nextInt() scanner.nextInt scanner String S = null; S null S = scanner.next() S scanner.next() scanner.next scanner int count; count String small = ""; small "" for(count=0 ; count < S.length() ; count++){
            if(count == K - 1){
                small += String.valueOf(S.charAt(count)).toLowerCase();
            }else{
                small += String.valueOf(S.charAt(count));
            }
        } count=0 ; count=0 count 0 count < S.length() count S.length() S.length S count++ count++ count {
            if(count == K - 1){
                small += String.valueOf(S.charAt(count)).toLowerCase();
            }else{
                small += String.valueOf(S.charAt(count));
            }
        } {
            if(count == K - 1){
                small += String.valueOf(S.charAt(count)).toLowerCase();
            }else{
                small += String.valueOf(S.charAt(count));
            }
        } if(count == K - 1){
                small += String.valueOf(S.charAt(count)).toLowerCase();
            }else{
                small += String.valueOf(S.charAt(count));
            } count == K - 1 count K - 1 K 1 {
                small += String.valueOf(S.charAt(count)).toLowerCase();
            } small += String.valueOf(S.charAt(count)).toLowerCase() small String.valueOf(S.charAt(count)).toLowerCase() String.valueOf(S.charAt(count)).toLowerCase String.valueOf(S.charAt(count)) String.valueOf String S.charAt(count) S.charAt S count {
                small += String.valueOf(S.charAt(count));
            } small += String.valueOf(S.charAt(count)) small String.valueOf(S.charAt(count)) String.valueOf String S.charAt(count) S.charAt S count System.out.println(small) System.out.println System.out System System.out small String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        Scanner scanner = new Scanner(System.in);
        
        int N = scanner.nextInt();
        int K = scanner.nextInt();
        
        String S = null;
        
        S = scanner.next();
        
        int count;
        String small = "";
        
        for(count=0 ; count < S.length() ; count++){
            if(count == K - 1){
                small += String.valueOf(S.charAt(count)).toLowerCase();
            }else{
                small += String.valueOf(S.charAt(count));
            }
        }
        
        System.out.println(small);
        
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner scanner = new Scanner(System.in);
        
        int N = scanner.nextInt();
        int K = scanner.nextInt();
        
        String S = null;
        
        S = scanner.next();
        
        int count;
        String small = "";
        
        for(count=0 ; count < S.length() ; count++){
            if(count == K - 1){
                small += String.valueOf(S.charAt(count)).toLowerCase();
            }else{
                small += String.valueOf(S.charAt(count));
            }
        }
        
        System.out.println(small);
        
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner scanner = new Scanner(System.in);
        
        int N = scanner.nextInt();
        int K = scanner.nextInt();
        
        String S = null;
        
        S = scanner.next();
        
        int count;
        String small = "";
        
        for(count=0 ; count < S.length() ; count++){
            if(count == K - 1){
                small += String.valueOf(S.charAt(count)).toLowerCase();
            }else{
                small += String.valueOf(S.charAt(count));
            }
        }
        
        System.out.println(small);
        
    }
}