import java.util.Scanner;


public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        char[] c = sc.next().toCharArray();
        c[K-1] += 32;
        for (int i=0;i<N;i++){System.out.print(c[i]);}
    }
} import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        char[] c = sc.next().toCharArray();
        c[K-1] += 32;
        for (int i=0;i<N;i++){System.out.print(c[i]);}
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        char[] c = sc.next().toCharArray();
        c[K-1] += 32;
        for (int i=0;i<N;i++){System.out.print(c[i]);}
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        char[] c = sc.next().toCharArray();
        c[K-1] += 32;
        for (int i=0;i<N;i++){System.out.print(c[i]);}
    } 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 char[] c = sc.next().toCharArray(); c sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc c[K-1] += 32 c[K-1] c K-1 K 1 32 for (int i=0;i<N;i++){System.out.print(c[i]);} int i=0; int i=0; i 0 i<N i N i++ i++ i {System.out.print(c[i]);} {System.out.print(c[i]);} System.out.print(c[i]) System.out.print System.out System System.out c[i] c i String[] args args public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        char[] c = sc.next().toCharArray();
        c[K-1] += 32;
        for (int i=0;i<N;i++){System.out.print(c[i]);}
    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        char[] c = sc.next().toCharArray();
        c[K-1] += 32;
        for (int i=0;i<N;i++){System.out.print(c[i]);}
    }
} Main
import java.util.Scanner;


public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        char[] c = sc.next().toCharArray();
        c[K-1] += 32;
        for (int i=0;i<N;i++){System.out.print(c[i]);}
    }
}