import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        
        int N = sc.nextInt();
        int K = sc.nextInt();
        String S = sc.next();
        
        StringBuilder sb = new StringBuilder();
        
        for(int i = 0; i < N; i++){
            if ( i == K - 1 ){
                sb.append(Character.toLowerCase(S.charAt(i)));
            } else {
                sb.append(S.charAt(i));
            }
            
        }
        
        System.out.println(sb);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        
        int N = sc.nextInt();
        int K = sc.nextInt();
        String S = sc.next();
        
        StringBuilder sb = new StringBuilder();
        
        for(int i = 0; i < N; i++){
            if ( i == K - 1 ){
                sb.append(Character.toLowerCase(S.charAt(i)));
            } else {
                sb.append(S.charAt(i));
            }
            
        }
        
        System.out.println(sb);
    }
} Main public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        
        int N = sc.nextInt();
        int K = sc.nextInt();
        String S = sc.next();
        
        StringBuilder sb = new StringBuilder();
        
        for(int i = 0; i < N; i++){
            if ( i == K - 1 ){
                sb.append(Character.toLowerCase(S.charAt(i)));
            } else {
                sb.append(S.charAt(i));
            }
            
        }
        
        System.out.println(sb);
    } main {
        
        Scanner sc = new Scanner(System.in);
        
        int N = sc.nextInt();
        int K = sc.nextInt();
        String S = sc.next();
        
        StringBuilder sb = new StringBuilder();
        
        for(int i = 0; i < N; i++){
            if ( i == K - 1 ){
                sb.append(Character.toLowerCase(S.charAt(i)));
            } else {
                sb.append(S.charAt(i));
            }
            
        }
        
        System.out.println(sb);
    } 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 StringBuilder sb = new StringBuilder(); sb new StringBuilder() for(int i = 0; i < N; i++){
            if ( i == K - 1 ){
                sb.append(Character.toLowerCase(S.charAt(i)));
            } else {
                sb.append(S.charAt(i));
            }
            
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            if ( i == K - 1 ){
                sb.append(Character.toLowerCase(S.charAt(i)));
            } else {
                sb.append(S.charAt(i));
            }
            
        } {
            if ( i == K - 1 ){
                sb.append(Character.toLowerCase(S.charAt(i)));
            } else {
                sb.append(S.charAt(i));
            }
            
        } if ( i == K - 1 ){
                sb.append(Character.toLowerCase(S.charAt(i)));
            } else {
                sb.append(S.charAt(i));
            } i == K - 1 i K - 1 K 1 {
                sb.append(Character.toLowerCase(S.charAt(i)));
            } sb.append(Character.toLowerCase(S.charAt(i))) sb.append sb Character.toLowerCase(S.charAt(i)) Character.toLowerCase Character S.charAt(i) S.charAt S i {
                sb.append(S.charAt(i));
            } sb.append(S.charAt(i)) sb.append sb S.charAt(i) S.charAt S i System.out.println(sb) System.out.println System.out System System.out sb String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        
        int N = sc.nextInt();
        int K = sc.nextInt();
        String S = sc.next();
        
        StringBuilder sb = new StringBuilder();
        
        for(int i = 0; i < N; i++){
            if ( i == K - 1 ){
                sb.append(Character.toLowerCase(S.charAt(i)));
            } else {
                sb.append(S.charAt(i));
            }
            
        }
        
        System.out.println(sb);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        
        int N = sc.nextInt();
        int K = sc.nextInt();
        String S = sc.next();
        
        StringBuilder sb = new StringBuilder();
        
        for(int i = 0; i < N; i++){
            if ( i == K - 1 ){
                sb.append(Character.toLowerCase(S.charAt(i)));
            } else {
                sb.append(S.charAt(i));
            }
            
        }
        
        System.out.println(sb);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        
        int N = sc.nextInt();
        int K = sc.nextInt();
        String S = sc.next();
        
        StringBuilder sb = new StringBuilder();
        
        for(int i = 0; i < N; i++){
            if ( i == K - 1 ){
                sb.append(Character.toLowerCase(S.charAt(i)));
            } else {
                sb.append(S.charAt(i));
            }
            
        }
        
        System.out.println(sb);
    }
}
