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();
    	String S = sc.next();
    	sc.close();
    	String S1,S2,S3;
    	if(K > 1) {
    		S1 = S.substring(0,K-1);
    	}else {
    		S1 = "";
    	}
    	S2 = S.substring(K-1,K);
    	if(K < N) {
    		S3 = S.substring(K,N);
    	}else {
    		S3 = "";
    	}
    	if(S2.equals("A")) {
    		S2 = "a";
    	}else if(S2.equals("B")) {
    		S2 = "b";
    	}else{
    		S2 = "c";
    	}
    	S = S1 + S2 + S3;
    	System.out.println(S);
    }
} 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();
    	String S = sc.next();
    	sc.close();
    	String S1,S2,S3;
    	if(K > 1) {
    		S1 = S.substring(0,K-1);
    	}else {
    		S1 = "";
    	}
    	S2 = S.substring(K-1,K);
    	if(K < N) {
    		S3 = S.substring(K,N);
    	}else {
    		S3 = "";
    	}
    	if(S2.equals("A")) {
    		S2 = "a";
    	}else if(S2.equals("B")) {
    		S2 = "b";
    	}else{
    		S2 = "c";
    	}
    	S = S1 + S2 + S3;
    	System.out.println(S);
    }
} 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();
    	sc.close();
    	String S1,S2,S3;
    	if(K > 1) {
    		S1 = S.substring(0,K-1);
    	}else {
    		S1 = "";
    	}
    	S2 = S.substring(K-1,K);
    	if(K < N) {
    		S3 = S.substring(K,N);
    	}else {
    		S3 = "";
    	}
    	if(S2.equals("A")) {
    		S2 = "a";
    	}else if(S2.equals("B")) {
    		S2 = "b";
    	}else{
    		S2 = "c";
    	}
    	S = S1 + S2 + S3;
    	System.out.println(S);
    } main {
    	Scanner sc = new Scanner(System.in);
    	int N = sc.nextInt();
    	int K = sc.nextInt();
    	String S = sc.next();
    	sc.close();
    	String S1,S2,S3;
    	if(K > 1) {
    		S1 = S.substring(0,K-1);
    	}else {
    		S1 = "";
    	}
    	S2 = S.substring(K-1,K);
    	if(K < N) {
    		S3 = S.substring(K,N);
    	}else {
    		S3 = "";
    	}
    	if(S2.equals("A")) {
    		S2 = "a";
    	}else if(S2.equals("B")) {
    		S2 = "b";
    	}else{
    		S2 = "c";
    	}
    	S = S1 + S2 + S3;
    	System.out.println(S);
    } 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 sc.close() sc.close sc String S1 S1 S2 S2 S3; S3 if(K > 1) {
    		S1 = S.substring(0,K-1);
    	}else {
    		S1 = "";
    	} K > 1 K 1 {
    		S1 = S.substring(0,K-1);
    	} S1 = S.substring(0,K-1) S1 S.substring(0,K-1) S.substring S 0 K-1 K 1 {
    		S1 = "";
    	} S1 = "" S1 "" S2 = S.substring(K-1,K) S2 S.substring(K-1,K) S.substring S K-1 K 1 K if(K < N) {
    		S3 = S.substring(K,N);
    	}else {
    		S3 = "";
    	} K < N K N {
    		S3 = S.substring(K,N);
    	} S3 = S.substring(K,N) S3 S.substring(K,N) S.substring S K N {
    		S3 = "";
    	} S3 = "" S3 "" if(S2.equals("A")) {
    		S2 = "a";
    	}else if(S2.equals("B")) {
    		S2 = "b";
    	}else{
    		S2 = "c";
    	} S2.equals("A") S2.equals S2 "A" {
    		S2 = "a";
    	} S2 = "a" S2 "a" if(S2.equals("B")) {
    		S2 = "b";
    	}else{
    		S2 = "c";
    	} S2.equals("B") S2.equals S2 "B" {
    		S2 = "b";
    	} S2 = "b" S2 "b" {
    		S2 = "c";
    	} S2 = "c" S2 "c" S = S1 + S2 + S3 S S1 + S2 + S3 S1 + S2 + S3 S1 S2 S3 System.out.println(S) System.out.println System.out System System.out S 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();
    	sc.close();
    	String S1,S2,S3;
    	if(K > 1) {
    		S1 = S.substring(0,K-1);
    	}else {
    		S1 = "";
    	}
    	S2 = S.substring(K-1,K);
    	if(K < N) {
    		S3 = S.substring(K,N);
    	}else {
    		S3 = "";
    	}
    	if(S2.equals("A")) {
    		S2 = "a";
    	}else if(S2.equals("B")) {
    		S2 = "b";
    	}else{
    		S2 = "c";
    	}
    	S = S1 + S2 + S3;
    	System.out.println(S);
    }
} 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();
    	sc.close();
    	String S1,S2,S3;
    	if(K > 1) {
    		S1 = S.substring(0,K-1);
    	}else {
    		S1 = "";
    	}
    	S2 = S.substring(K-1,K);
    	if(K < N) {
    		S3 = S.substring(K,N);
    	}else {
    		S3 = "";
    	}
    	if(S2.equals("A")) {
    		S2 = "a";
    	}else if(S2.equals("B")) {
    		S2 = "b";
    	}else{
    		S2 = "c";
    	}
    	S = S1 + S2 + S3;
    	System.out.println(S);
    }
} 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();
    	String S = sc.next();
    	sc.close();
    	String S1,S2,S3;
    	if(K > 1) {
    		S1 = S.substring(0,K-1);
    	}else {
    		S1 = "";
    	}
    	S2 = S.substring(K-1,K);
    	if(K < N) {
    		S3 = S.substring(K,N);
    	}else {
    		S3 = "";
    	}
    	if(S2.equals("A")) {
    		S2 = "a";
    	}else if(S2.equals("B")) {
    		S2 = "b";
    	}else{
    		S2 = "c";
    	}
    	S = S1 + S2 + S3;
    	System.out.println(S);
    }
}