import java.util.*;
public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N,K;
        String S;
        N = sc.nextInt();
        K = sc.nextInt();
        S = sc.next();
        String[] array = S.split("",0);
        for (int i = 0; i < N; i++) {
            if (i==K-1) array[i] = array[i].toLowerCase();            
            System.out.print(array[i]);
        }
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N,K;
        String S;
        N = sc.nextInt();
        K = sc.nextInt();
        S = sc.next();
        String[] array = S.split("",0);
        for (int i = 0; i < N; i++) {
            if (i==K-1) array[i] = array[i].toLowerCase();            
            System.out.print(array[i]);
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N,K;
        String S;
        N = sc.nextInt();
        K = sc.nextInt();
        S = sc.next();
        String[] array = S.split("",0);
        for (int i = 0; i < N; i++) {
            if (i==K-1) array[i] = array[i].toLowerCase();            
            System.out.print(array[i]);
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int N,K;
        String S;
        N = sc.nextInt();
        K = sc.nextInt();
        S = sc.next();
        String[] array = S.split("",0);
        for (int i = 0; i < N; i++) {
            if (i==K-1) array[i] = array[i].toLowerCase();            
            System.out.print(array[i]);
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N N K; K String S; S N = sc.nextInt() N sc.nextInt() sc.nextInt sc K = sc.nextInt() K sc.nextInt() sc.nextInt sc S = sc.next() S sc.next() sc.next sc String[] array = S.split("",0); array S.split("",0) S.split S "" 0 for (int i = 0; i < N; i++) {
            if (i==K-1) array[i] = array[i].toLowerCase();            
            System.out.print(array[i]);
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            if (i==K-1) array[i] = array[i].toLowerCase();            
            System.out.print(array[i]);
        } {
            if (i==K-1) array[i] = array[i].toLowerCase();            
            System.out.print(array[i]);
        } if (i==K-1) array[i] = array[i].toLowerCase(); i==K-1 i K-1 K 1 array[i] = array[i].toLowerCase() array[i] array i array[i].toLowerCase() array[i].toLowerCase array[i] array i System.out.print(array[i]) System.out.print System.out System System.out array[i] array i String[] args args public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N,K;
        String S;
        N = sc.nextInt();
        K = sc.nextInt();
        S = sc.next();
        String[] array = S.split("",0);
        for (int i = 0; i < N; i++) {
            if (i==K-1) array[i] = array[i].toLowerCase();            
            System.out.print(array[i]);
        }
    }
} public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N,K;
        String S;
        N = sc.nextInt();
        K = sc.nextInt();
        S = sc.next();
        String[] array = S.split("",0);
        for (int i = 0; i < N; i++) {
            if (i==K-1) array[i] = array[i].toLowerCase();            
            System.out.print(array[i]);
        }
    }
} Main
import java.util.*;
public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N,K;
        String S;
        N = sc.nextInt();
        K = sc.nextInt();
        S = sc.next();
        String[] array = S.split("",0);
        for (int i = 0; i < N; i++) {
            if (i==K-1) array[i] = array[i].toLowerCase();            
            System.out.print(array[i]);
        }
    }
}