
import java.util.Scanner;

public class Main {
	public static void main(String arg[]) {

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int K = sc.nextInt();

		String S = sc.next();
		char[] ch = new char[N];

		for (int i = 0; i < N; i++) {
			ch[i] = S.charAt(i);

			if (i == K - 1) {
				if (ch[i] == 'A') {
					ch[i] = 'a';
				} else if (ch[i] == 'B') {
					ch[i] = 'b';
				} else if (ch[i] == 'C') {
					ch[i] = 'c';
				}
			}
		}

		for (int i = 0; i < N; i++) {
			System.out.print(ch[i]);
		}

	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String arg[]) {

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int K = sc.nextInt();

		String S = sc.next();
		char[] ch = new char[N];

		for (int i = 0; i < N; i++) {
			ch[i] = S.charAt(i);

			if (i == K - 1) {
				if (ch[i] == 'A') {
					ch[i] = 'a';
				} else if (ch[i] == 'B') {
					ch[i] = 'b';
				} else if (ch[i] == 'C') {
					ch[i] = 'c';
				}
			}
		}

		for (int i = 0; i < N; i++) {
			System.out.print(ch[i]);
		}

	}
} Main public static void main(String arg[]) {

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int K = sc.nextInt();

		String S = sc.next();
		char[] ch = new char[N];

		for (int i = 0; i < N; i++) {
			ch[i] = S.charAt(i);

			if (i == K - 1) {
				if (ch[i] == 'A') {
					ch[i] = 'a';
				} else if (ch[i] == 'B') {
					ch[i] = 'b';
				} else if (ch[i] == 'C') {
					ch[i] = 'c';
				}
			}
		}

		for (int i = 0; i < N; i++) {
			System.out.print(ch[i]);
		}

	} main {

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int K = sc.nextInt();

		String S = sc.next();
		char[] ch = new char[N];

		for (int i = 0; i < N; i++) {
			ch[i] = S.charAt(i);

			if (i == K - 1) {
				if (ch[i] == 'A') {
					ch[i] = 'a';
				} else if (ch[i] == 'B') {
					ch[i] = 'b';
				} else if (ch[i] == 'C') {
					ch[i] = 'c';
				}
			}
		}

		for (int i = 0; i < N; i++) {
			System.out.print(ch[i]);
		}

	} 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 char[] ch = new char[N]; ch new char[N] N for (int i = 0; i < N; i++) {
			ch[i] = S.charAt(i);

			if (i == K - 1) {
				if (ch[i] == 'A') {
					ch[i] = 'a';
				} else if (ch[i] == 'B') {
					ch[i] = 'b';
				} else if (ch[i] == 'C') {
					ch[i] = 'c';
				}
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			ch[i] = S.charAt(i);

			if (i == K - 1) {
				if (ch[i] == 'A') {
					ch[i] = 'a';
				} else if (ch[i] == 'B') {
					ch[i] = 'b';
				} else if (ch[i] == 'C') {
					ch[i] = 'c';
				}
			}
		} {
			ch[i] = S.charAt(i);

			if (i == K - 1) {
				if (ch[i] == 'A') {
					ch[i] = 'a';
				} else if (ch[i] == 'B') {
					ch[i] = 'b';
				} else if (ch[i] == 'C') {
					ch[i] = 'c';
				}
			}
		} ch[i] = S.charAt(i) ch[i] ch i S.charAt(i) S.charAt S i if (i == K - 1) {
				if (ch[i] == 'A') {
					ch[i] = 'a';
				} else if (ch[i] == 'B') {
					ch[i] = 'b';
				} else if (ch[i] == 'C') {
					ch[i] = 'c';
				}
			} i == K - 1 i K - 1 K 1 {
				if (ch[i] == 'A') {
					ch[i] = 'a';
				} else if (ch[i] == 'B') {
					ch[i] = 'b';
				} else if (ch[i] == 'C') {
					ch[i] = 'c';
				}
			} if (ch[i] == 'A') {
					ch[i] = 'a';
				} else if (ch[i] == 'B') {
					ch[i] = 'b';
				} else if (ch[i] == 'C') {
					ch[i] = 'c';
				} ch[i] == 'A' ch[i] ch i 'A' {
					ch[i] = 'a';
				} ch[i] = 'a' ch[i] ch i 'a' if (ch[i] == 'B') {
					ch[i] = 'b';
				} else if (ch[i] == 'C') {
					ch[i] = 'c';
				} ch[i] == 'B' ch[i] ch i 'B' {
					ch[i] = 'b';
				} ch[i] = 'b' ch[i] ch i 'b' if (ch[i] == 'C') {
					ch[i] = 'c';
				} ch[i] == 'C' ch[i] ch i 'C' {
					ch[i] = 'c';
				} ch[i] = 'c' ch[i] ch i 'c' for (int i = 0; i < N; i++) {
			System.out.print(ch[i]);
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			System.out.print(ch[i]);
		} {
			System.out.print(ch[i]);
		} System.out.print(ch[i]) System.out.print System.out System System.out ch[i] ch i String arg[] arg public class Main {
	public static void main(String arg[]) {

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int K = sc.nextInt();

		String S = sc.next();
		char[] ch = new char[N];

		for (int i = 0; i < N; i++) {
			ch[i] = S.charAt(i);

			if (i == K - 1) {
				if (ch[i] == 'A') {
					ch[i] = 'a';
				} else if (ch[i] == 'B') {
					ch[i] = 'b';
				} else if (ch[i] == 'C') {
					ch[i] = 'c';
				}
			}
		}

		for (int i = 0; i < N; i++) {
			System.out.print(ch[i]);
		}

	}
} public class Main {
	public static void main(String arg[]) {

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int K = sc.nextInt();

		String S = sc.next();
		char[] ch = new char[N];

		for (int i = 0; i < N; i++) {
			ch[i] = S.charAt(i);

			if (i == K - 1) {
				if (ch[i] == 'A') {
					ch[i] = 'a';
				} else if (ch[i] == 'B') {
					ch[i] = 'b';
				} else if (ch[i] == 'C') {
					ch[i] = 'c';
				}
			}
		}

		for (int i = 0; i < N; i++) {
			System.out.print(ch[i]);
		}

	}
} Main

import java.util.Scanner;

public class Main {
	public static void main(String arg[]) {

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int K = sc.nextInt();

		String S = sc.next();
		char[] ch = new char[N];

		for (int i = 0; i < N; i++) {
			ch[i] = S.charAt(i);

			if (i == K - 1) {
				if (ch[i] == 'A') {
					ch[i] = 'a';
				} else if (ch[i] == 'B') {
					ch[i] = 'b';
				} else if (ch[i] == 'C') {
					ch[i] = 'c';
				}
			}
		}

		for (int i = 0; i < N; i++) {
			System.out.print(ch[i]);
		}

	}
}
