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 t = sc.next();
		String buff = "";
		if(t.substring(k-1,k).equals("A")) {
			buff = "a";
		}else if(t.substring(k-1,k).equals("B")) {
			buff = "b";
		}else{
			buff = "c";
		}

		System.out.println(t.substring(0,k-1)+buff+t.substring(k,n));
	}
}

 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 t = sc.next();
		String buff = "";
		if(t.substring(k-1,k).equals("A")) {
			buff = "a";
		}else if(t.substring(k-1,k).equals("B")) {
			buff = "b";
		}else{
			buff = "c";
		}

		System.out.println(t.substring(0,k-1)+buff+t.substring(k,n));
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		String t = sc.next();
		String buff = "";
		if(t.substring(k-1,k).equals("A")) {
			buff = "a";
		}else if(t.substring(k-1,k).equals("B")) {
			buff = "b";
		}else{
			buff = "c";
		}

		System.out.println(t.substring(0,k-1)+buff+t.substring(k,n));
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		String t = sc.next();
		String buff = "";
		if(t.substring(k-1,k).equals("A")) {
			buff = "a";
		}else if(t.substring(k-1,k).equals("B")) {
			buff = "b";
		}else{
			buff = "c";
		}

		System.out.println(t.substring(0,k-1)+buff+t.substring(k,n));
	} 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 t = sc.next(); t sc.next() sc.next sc String buff = ""; buff "" if(t.substring(k-1,k).equals("A")) {
			buff = "a";
		}else if(t.substring(k-1,k).equals("B")) {
			buff = "b";
		}else{
			buff = "c";
		} t.substring(k-1,k).equals("A") t.substring(k-1,k).equals t.substring(k-1,k) t.substring t k-1 k 1 k "A" {
			buff = "a";
		} buff = "a" buff "a" if(t.substring(k-1,k).equals("B")) {
			buff = "b";
		}else{
			buff = "c";
		} t.substring(k-1,k).equals("B") t.substring(k-1,k).equals t.substring(k-1,k) t.substring t k-1 k 1 k "B" {
			buff = "b";
		} buff = "b" buff "b" {
			buff = "c";
		} buff = "c" buff "c" System.out.println(t.substring(0,k-1)+buff+t.substring(k,n)) System.out.println System.out System System.out t.substring(0,k-1)+buff+t.substring(k,n) t.substring(0,k-1)+buff+t.substring(k,n) t.substring(0,k-1) t.substring t 0 k-1 k 1 buff t.substring(k,n) t.substring t k n 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 t = sc.next();
		String buff = "";
		if(t.substring(k-1,k).equals("A")) {
			buff = "a";
		}else if(t.substring(k-1,k).equals("B")) {
			buff = "b";
		}else{
			buff = "c";
		}

		System.out.println(t.substring(0,k-1)+buff+t.substring(k,n));
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		String t = sc.next();
		String buff = "";
		if(t.substring(k-1,k).equals("A")) {
			buff = "a";
		}else if(t.substring(k-1,k).equals("B")) {
			buff = "b";
		}else{
			buff = "c";
		}

		System.out.println(t.substring(0,k-1)+buff+t.substring(k,n));
	}
} 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 t = sc.next();
		String buff = "";
		if(t.substring(k-1,k).equals("A")) {
			buff = "a";
		}else if(t.substring(k-1,k).equals("B")) {
			buff = "b";
		}else{
			buff = "c";
		}

		System.out.println(t.substring(0,k-1)+buff+t.substring(k,n));
	}
}


