import java.util.*;

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();

        String[] str = S.split("", -1);
        for (int i=0;i<N;i++){
            if(i==K-1){
                if(str[i].equals("A")){
                    System.out.print("a");
                } else if (str[i].equals("B")){
                    System.out.print("b");
                } else if (str[i].equals("C")){
                    System.out.print("c");
                }
            }else{
                System.out.print(str[i]);
            }
        }
        sc.close();
    }
} import java.util.*; util.* java 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();

        String[] str = S.split("", -1);
        for (int i=0;i<N;i++){
            if(i==K-1){
                if(str[i].equals("A")){
                    System.out.print("a");
                } else if (str[i].equals("B")){
                    System.out.print("b");
                } else if (str[i].equals("C")){
                    System.out.print("c");
                }
            }else{
                System.out.print(str[i]);
            }
        }
        sc.close();
    }
} 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();

        String[] str = S.split("", -1);
        for (int i=0;i<N;i++){
            if(i==K-1){
                if(str[i].equals("A")){
                    System.out.print("a");
                } else if (str[i].equals("B")){
                    System.out.print("b");
                } else if (str[i].equals("C")){
                    System.out.print("c");
                }
            }else{
                System.out.print(str[i]);
            }
        }
        sc.close();
    } main {
        Scanner sc = new  Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        String S = sc.next();

        String[] str = S.split("", -1);
        for (int i=0;i<N;i++){
            if(i==K-1){
                if(str[i].equals("A")){
                    System.out.print("a");
                } else if (str[i].equals("B")){
                    System.out.print("b");
                } else if (str[i].equals("C")){
                    System.out.print("c");
                }
            }else{
                System.out.print(str[i]);
            }
        }
        sc.close();
    } 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 String[] str = S.split("", -1); str S.split("", -1) S.split S "" -1 1 for (int i=0;i<N;i++){
            if(i==K-1){
                if(str[i].equals("A")){
                    System.out.print("a");
                } else if (str[i].equals("B")){
                    System.out.print("b");
                } else if (str[i].equals("C")){
                    System.out.print("c");
                }
            }else{
                System.out.print(str[i]);
            }
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            if(i==K-1){
                if(str[i].equals("A")){
                    System.out.print("a");
                } else if (str[i].equals("B")){
                    System.out.print("b");
                } else if (str[i].equals("C")){
                    System.out.print("c");
                }
            }else{
                System.out.print(str[i]);
            }
        } {
            if(i==K-1){
                if(str[i].equals("A")){
                    System.out.print("a");
                } else if (str[i].equals("B")){
                    System.out.print("b");
                } else if (str[i].equals("C")){
                    System.out.print("c");
                }
            }else{
                System.out.print(str[i]);
            }
        } if(i==K-1){
                if(str[i].equals("A")){
                    System.out.print("a");
                } else if (str[i].equals("B")){
                    System.out.print("b");
                } else if (str[i].equals("C")){
                    System.out.print("c");
                }
            }else{
                System.out.print(str[i]);
            } i==K-1 i K-1 K 1 {
                if(str[i].equals("A")){
                    System.out.print("a");
                } else if (str[i].equals("B")){
                    System.out.print("b");
                } else if (str[i].equals("C")){
                    System.out.print("c");
                }
            } if(str[i].equals("A")){
                    System.out.print("a");
                } else if (str[i].equals("B")){
                    System.out.print("b");
                } else if (str[i].equals("C")){
                    System.out.print("c");
                } str[i].equals("A") str[i].equals str[i] str i "A" {
                    System.out.print("a");
                } System.out.print("a") System.out.print System.out System System.out "a" if (str[i].equals("B")){
                    System.out.print("b");
                } else if (str[i].equals("C")){
                    System.out.print("c");
                } str[i].equals("B") str[i].equals str[i] str i "B" {
                    System.out.print("b");
                } System.out.print("b") System.out.print System.out System System.out "b" if (str[i].equals("C")){
                    System.out.print("c");
                } str[i].equals("C") str[i].equals str[i] str i "C" {
                    System.out.print("c");
                } System.out.print("c") System.out.print System.out System System.out "c" {
                System.out.print(str[i]);
            } System.out.print(str[i]) System.out.print System.out System System.out str[i] str i sc.close() sc.close sc String[] args args
import java.util.*;

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();

        String[] str = S.split("", -1);
        for (int i=0;i<N;i++){
            if(i==K-1){
                if(str[i].equals("A")){
                    System.out.print("a");
                } else if (str[i].equals("B")){
                    System.out.print("b");
                } else if (str[i].equals("C")){
                    System.out.print("c");
                }
            }else{
                System.out.print(str[i]);
            }
        }
        sc.close();
    }
}