import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int X = sc.nextInt();
		int Y = sc.nextInt();
		String abc = sc.next();
		String[] abcList = abc.split("");

		if(abcList[Y-1].equals("A")) {
			abcList[Y-1] = "a";
		}else {
			if(abcList[Y-1].equals("B")) {
				abcList[Y-1] = "b";
			}else {
				abcList[Y-1] = "c";
			}
		}

		for(String ans:abcList) {
			System.out.print(ans);
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int X = sc.nextInt();
		int Y = sc.nextInt();
		String abc = sc.next();
		String[] abcList = abc.split("");

		if(abcList[Y-1].equals("A")) {
			abcList[Y-1] = "a";
		}else {
			if(abcList[Y-1].equals("B")) {
				abcList[Y-1] = "b";
			}else {
				abcList[Y-1] = "c";
			}
		}

		for(String ans:abcList) {
			System.out.print(ans);
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int X = sc.nextInt();
		int Y = sc.nextInt();
		String abc = sc.next();
		String[] abcList = abc.split("");

		if(abcList[Y-1].equals("A")) {
			abcList[Y-1] = "a";
		}else {
			if(abcList[Y-1].equals("B")) {
				abcList[Y-1] = "b";
			}else {
				abcList[Y-1] = "c";
			}
		}

		for(String ans:abcList) {
			System.out.print(ans);
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int X = sc.nextInt();
		int Y = sc.nextInt();
		String abc = sc.next();
		String[] abcList = abc.split("");

		if(abcList[Y-1].equals("A")) {
			abcList[Y-1] = "a";
		}else {
			if(abcList[Y-1].equals("B")) {
				abcList[Y-1] = "b";
			}else {
				abcList[Y-1] = "c";
			}
		}

		for(String ans:abcList) {
			System.out.print(ans);
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int X = sc.nextInt(); X sc.nextInt() sc.nextInt sc int Y = sc.nextInt(); Y sc.nextInt() sc.nextInt sc String abc = sc.next(); abc sc.next() sc.next sc String[] abcList = abc.split(""); abcList abc.split("") abc.split abc "" if(abcList[Y-1].equals("A")) {
			abcList[Y-1] = "a";
		}else {
			if(abcList[Y-1].equals("B")) {
				abcList[Y-1] = "b";
			}else {
				abcList[Y-1] = "c";
			}
		} abcList[Y-1].equals("A") abcList[Y-1].equals abcList[Y-1] abcList Y-1 Y 1 "A" {
			abcList[Y-1] = "a";
		} abcList[Y-1] = "a" abcList[Y-1] abcList Y-1 Y 1 "a" {
			if(abcList[Y-1].equals("B")) {
				abcList[Y-1] = "b";
			}else {
				abcList[Y-1] = "c";
			}
		} if(abcList[Y-1].equals("B")) {
				abcList[Y-1] = "b";
			}else {
				abcList[Y-1] = "c";
			} abcList[Y-1].equals("B") abcList[Y-1].equals abcList[Y-1] abcList Y-1 Y 1 "B" {
				abcList[Y-1] = "b";
			} abcList[Y-1] = "b" abcList[Y-1] abcList Y-1 Y 1 "b" {
				abcList[Y-1] = "c";
			} abcList[Y-1] = "c" abcList[Y-1] abcList Y-1 Y 1 "c" for(String ans:abcList) {
			System.out.print(ans);
		} String ans abcList {
			System.out.print(ans);
		} {
			System.out.print(ans);
		} System.out.print(ans) System.out.print System.out System System.out ans String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int X = sc.nextInt();
		int Y = sc.nextInt();
		String abc = sc.next();
		String[] abcList = abc.split("");

		if(abcList[Y-1].equals("A")) {
			abcList[Y-1] = "a";
		}else {
			if(abcList[Y-1].equals("B")) {
				abcList[Y-1] = "b";
			}else {
				abcList[Y-1] = "c";
			}
		}

		for(String ans:abcList) {
			System.out.print(ans);
		}
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int X = sc.nextInt();
		int Y = sc.nextInt();
		String abc = sc.next();
		String[] abcList = abc.split("");

		if(abcList[Y-1].equals("A")) {
			abcList[Y-1] = "a";
		}else {
			if(abcList[Y-1].equals("B")) {
				abcList[Y-1] = "b";
			}else {
				abcList[Y-1] = "c";
			}
		}

		for(String ans:abcList) {
			System.out.print(ans);
		}
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int X = sc.nextInt();
		int Y = sc.nextInt();
		String abc = sc.next();
		String[] abcList = abc.split("");

		if(abcList[Y-1].equals("A")) {
			abcList[Y-1] = "a";
		}else {
			if(abcList[Y-1].equals("B")) {
				abcList[Y-1] = "b";
			}else {
				abcList[Y-1] = "c";
			}
		}

		for(String ans:abcList) {
			System.out.print(ans);
		}
	}
}
