import 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();
        String S = sc.next();
        char s = S.charAt(K-1);
        String sn = String.valueOf(s);
        if(sn.equals("A")){
            sn = "a";
        }
        else if(sn.equals("B")){
            sn = "b";
        }
        else if(sn.equals("C")){
            sn = "c";
        }

        if(K==1){
            System.out.println(sn + S.substring(1));
        }
        else if(K==2){
            System.out.println(S.charAt(0) + sn + S.substring(2));
        }
        else if(K>=3){
            System.out.println(S.substring(0, K-1) + sn + S.substring(K));
        }
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int K = sc.nextInt();
        String S = sc.next();
        char s = S.charAt(K-1);
        String sn = String.valueOf(s);
        if(sn.equals("A")){
            sn = "a";
        }
        else if(sn.equals("B")){
            sn = "b";
        }
        else if(sn.equals("C")){
            sn = "c";
        }

        if(K==1){
            System.out.println(sn + S.substring(1));
        }
        else if(K==2){
            System.out.println(S.charAt(0) + sn + S.substring(2));
        }
        else if(K>=3){
            System.out.println(S.substring(0, K-1) + sn + S.substring(K));
        }
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int K = sc.nextInt();
        String S = sc.next();
        char s = S.charAt(K-1);
        String sn = String.valueOf(s);
        if(sn.equals("A")){
            sn = "a";
        }
        else if(sn.equals("B")){
            sn = "b";
        }
        else if(sn.equals("C")){
            sn = "c";
        }

        if(K==1){
            System.out.println(sn + S.substring(1));
        }
        else if(K==2){
            System.out.println(S.charAt(0) + sn + S.substring(2));
        }
        else if(K>=3){
            System.out.println(S.substring(0, K-1) + sn + S.substring(K));
        }
    } main {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int K = sc.nextInt();
        String S = sc.next();
        char s = S.charAt(K-1);
        String sn = String.valueOf(s);
        if(sn.equals("A")){
            sn = "a";
        }
        else if(sn.equals("B")){
            sn = "b";
        }
        else if(sn.equals("C")){
            sn = "c";
        }

        if(K==1){
            System.out.println(sn + S.substring(1));
        }
        else if(K==2){
            System.out.println(S.charAt(0) + sn + S.substring(2));
        }
        else if(K>=3){
            System.out.println(S.substring(0, K-1) + sn + S.substring(K));
        }
    } 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 char s = S.charAt(K-1); s S.charAt(K-1) S.charAt S K-1 K 1 String sn = String.valueOf(s); sn String.valueOf(s) String.valueOf String s if(sn.equals("A")){
            sn = "a";
        }
        else if(sn.equals("B")){
            sn = "b";
        }
        else if(sn.equals("C")){
            sn = "c";
        } sn.equals("A") sn.equals sn "A" {
            sn = "a";
        } sn = "a" sn "a" if(sn.equals("B")){
            sn = "b";
        }
        else if(sn.equals("C")){
            sn = "c";
        } sn.equals("B") sn.equals sn "B" {
            sn = "b";
        } sn = "b" sn "b" if(sn.equals("C")){
            sn = "c";
        } sn.equals("C") sn.equals sn "C" {
            sn = "c";
        } sn = "c" sn "c" if(K==1){
            System.out.println(sn + S.substring(1));
        }
        else if(K==2){
            System.out.println(S.charAt(0) + sn + S.substring(2));
        }
        else if(K>=3){
            System.out.println(S.substring(0, K-1) + sn + S.substring(K));
        } K==1 K 1 {
            System.out.println(sn + S.substring(1));
        } System.out.println(sn + S.substring(1)) System.out.println System.out System System.out sn + S.substring(1) sn S.substring(1) S.substring S 1 if(K==2){
            System.out.println(S.charAt(0) + sn + S.substring(2));
        }
        else if(K>=3){
            System.out.println(S.substring(0, K-1) + sn + S.substring(K));
        } K==2 K 2 {
            System.out.println(S.charAt(0) + sn + S.substring(2));
        } System.out.println(S.charAt(0) + sn + S.substring(2)) System.out.println System.out System System.out S.charAt(0) + sn + S.substring(2) S.charAt(0) + sn + S.substring(2) S.charAt(0) S.charAt S 0 sn S.substring(2) S.substring S 2 if(K>=3){
            System.out.println(S.substring(0, K-1) + sn + S.substring(K));
        } K>=3 K 3 {
            System.out.println(S.substring(0, K-1) + sn + S.substring(K));
        } System.out.println(S.substring(0, K-1) + sn + S.substring(K)) System.out.println System.out System System.out S.substring(0, K-1) + sn + S.substring(K) S.substring(0, K-1) + sn + S.substring(K) S.substring(0, K-1) S.substring S 0 K-1 K 1 sn S.substring(K) S.substring S K 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();
        String S = sc.next();
        char s = S.charAt(K-1);
        String sn = String.valueOf(s);
        if(sn.equals("A")){
            sn = "a";
        }
        else if(sn.equals("B")){
            sn = "b";
        }
        else if(sn.equals("C")){
            sn = "c";
        }

        if(K==1){
            System.out.println(sn + S.substring(1));
        }
        else if(K==2){
            System.out.println(S.charAt(0) + sn + S.substring(2));
        }
        else if(K>=3){
            System.out.println(S.substring(0, K-1) + sn + S.substring(K));
        }
    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int K = sc.nextInt();
        String S = sc.next();
        char s = S.charAt(K-1);
        String sn = String.valueOf(s);
        if(sn.equals("A")){
            sn = "a";
        }
        else if(sn.equals("B")){
            sn = "b";
        }
        else if(sn.equals("C")){
            sn = "c";
        }

        if(K==1){
            System.out.println(sn + S.substring(1));
        }
        else if(K==2){
            System.out.println(S.charAt(0) + sn + S.substring(2));
        }
        else if(K>=3){
            System.out.println(S.substring(0, K-1) + sn + S.substring(K));
        }
    }
} Main
import 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();
        String S = sc.next();
        char s = S.charAt(K-1);
        String sn = String.valueOf(s);
        if(sn.equals("A")){
            sn = "a";
        }
        else if(sn.equals("B")){
            sn = "b";
        }
        else if(sn.equals("C")){
            sn = "c";
        }

        if(K==1){
            System.out.println(sn + S.substring(1));
        }
        else if(K==2){
            System.out.println(S.charAt(0) + sn + S.substring(2));
        }
        else if(K>=3){
            System.out.println(S.substring(0, K-1) + sn + S.substring(K));
        }
    }
}