import java.util.*;

class Main{
    public static void main(String argv[]) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        String[] str = sc.next().split("");
        str[K-1] = str[K-1].toLowerCase();
        for(String x:str){
            System.out.print(x);
        }
    }
} import java.util.*; util.* java class Main{
    public static void main(String argv[]) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        String[] str = sc.next().split("");
        str[K-1] = str[K-1].toLowerCase();
        for(String x:str){
            System.out.print(x);
        }
    }
} Main public static void main(String argv[]) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        String[] str = sc.next().split("");
        str[K-1] = str[K-1].toLowerCase();
        for(String x:str){
            System.out.print(x);
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        String[] str = sc.next().split("");
        str[K-1] = str[K-1].toLowerCase();
        for(String x:str){
            System.out.print(x);
        }
    } 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[] str = sc.next().split(""); str sc.next().split("") sc.next().split sc.next() sc.next sc "" str[K-1] = str[K-1].toLowerCase() str[K-1] str K-1 K 1 str[K-1].toLowerCase() str[K-1].toLowerCase str[K-1] str K-1 K 1 for(String x:str){
            System.out.print(x);
        } String x str {
            System.out.print(x);
        } {
            System.out.print(x);
        } System.out.print(x) System.out.print System.out System System.out x String argv[] argv
import java.util.*;

class Main{
    public static void main(String argv[]) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        String[] str = sc.next().split("");
        str[K-1] = str[K-1].toLowerCase();
        for(String x:str){
            System.out.print(x);
        }
    }
}