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();
	for(int i=0;i<N;i++){
	    if(i!=K-1){
		System.out.print(S.charAt(i));
	    }else{
		char sk = S.charAt(i);
		if(sk=='A') System.out.print('a');
		else if(sk=='B') System.out.print('b');
		else System.out.print('c');
	    }
	}
    }
} 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();
	for(int i=0;i<N;i++){
	    if(i!=K-1){
		System.out.print(S.charAt(i));
	    }else{
		char sk = S.charAt(i);
		if(sk=='A') System.out.print('a');
		else if(sk=='B') System.out.print('b');
		else System.out.print('c');
	    }
	}
    }
} 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();
	for(int i=0;i<N;i++){
	    if(i!=K-1){
		System.out.print(S.charAt(i));
	    }else{
		char sk = S.charAt(i);
		if(sk=='A') System.out.print('a');
		else if(sk=='B') System.out.print('b');
		else System.out.print('c');
	    }
	}
    } main {
	Scanner sc = new Scanner(System.in);
	int N = sc.nextInt();
	int K = sc.nextInt();
	String S = sc.next();
	for(int i=0;i<N;i++){
	    if(i!=K-1){
		System.out.print(S.charAt(i));
	    }else{
		char sk = S.charAt(i);
		if(sk=='A') System.out.print('a');
		else if(sk=='B') System.out.print('b');
		else System.out.print('c');
	    }
	}
    } 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 for(int i=0;i<N;i++){
	    if(i!=K-1){
		System.out.print(S.charAt(i));
	    }else{
		char sk = S.charAt(i);
		if(sk=='A') System.out.print('a');
		else if(sk=='B') System.out.print('b');
		else System.out.print('c');
	    }
	} int i=0; int i=0; i 0 i<N i N i++ i++ i {
	    if(i!=K-1){
		System.out.print(S.charAt(i));
	    }else{
		char sk = S.charAt(i);
		if(sk=='A') System.out.print('a');
		else if(sk=='B') System.out.print('b');
		else System.out.print('c');
	    }
	} {
	    if(i!=K-1){
		System.out.print(S.charAt(i));
	    }else{
		char sk = S.charAt(i);
		if(sk=='A') System.out.print('a');
		else if(sk=='B') System.out.print('b');
		else System.out.print('c');
	    }
	} if(i!=K-1){
		System.out.print(S.charAt(i));
	    }else{
		char sk = S.charAt(i);
		if(sk=='A') System.out.print('a');
		else if(sk=='B') System.out.print('b');
		else System.out.print('c');
	    } i!=K-1 i K-1 K 1 {
		System.out.print(S.charAt(i));
	    } System.out.print(S.charAt(i)) System.out.print System.out System System.out S.charAt(i) S.charAt S i {
		char sk = S.charAt(i);
		if(sk=='A') System.out.print('a');
		else if(sk=='B') System.out.print('b');
		else System.out.print('c');
	    } char sk = S.charAt(i); sk S.charAt(i) S.charAt S i if(sk=='A') System.out.print('a');
		else if(sk=='B') System.out.print('b');
		else System.out.print('c'); sk=='A' sk 'A' System.out.print('a') System.out.print System.out System System.out 'a' if(sk=='B') System.out.print('b');
		else System.out.print('c'); sk=='B' sk 'B' System.out.print('b') System.out.print System.out System System.out 'b' System.out.print('c') System.out.print System.out System System.out 'c' 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();
	for(int i=0;i<N;i++){
	    if(i!=K-1){
		System.out.print(S.charAt(i));
	    }else{
		char sk = S.charAt(i);
		if(sk=='A') System.out.print('a');
		else if(sk=='B') System.out.print('b');
		else System.out.print('c');
	    }
	}
    }
} 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();
	for(int i=0;i<N;i++){
	    if(i!=K-1){
		System.out.print(S.charAt(i));
	    }else{
		char sk = S.charAt(i);
		if(sk=='A') System.out.print('a');
		else if(sk=='B') System.out.print('b');
		else System.out.print('c');
	    }
	}
    }
} 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();
	for(int i=0;i<N;i++){
	    if(i!=K-1){
		System.out.print(S.charAt(i));
	    }else{
		char sk = S.charAt(i);
		if(sk=='A') System.out.print('a');
		else if(sk=='B') System.out.print('b');
		else System.out.print('c');
	    }
	}
    }
}
