import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int K = scan.nextInt();

		String S = scan.next();
		char[] list = new char[N] ;

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

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

		for (int i = 0; i < N; i++) {
			System.out.print(list[i]);
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int K = scan.nextInt();

		String S = scan.next();
		char[] list = new char[N] ;

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

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

		for (int i = 0; i < N; i++) {
			System.out.print(list[i]);
		}
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int K = scan.nextInt();

		String S = scan.next();
		char[] list = new char[N] ;

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

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

		for (int i = 0; i < N; i++) {
			System.out.print(list[i]);
		}
	} main {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int K = scan.nextInt();

		String S = scan.next();
		char[] list = new char[N] ;

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

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

		for (int i = 0; i < N; i++) {
			System.out.print(list[i]);
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan int K = scan.nextInt(); K scan.nextInt() scan.nextInt scan String S = scan.next(); S scan.next() scan.next scan char[] list = new char[N] ; list new char[N] N for (int i = 0; i < N; i++) {
			list[i] = S.charAt(i) ;

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

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

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

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int K = scan.nextInt();

		String S = scan.next();
		char[] list = new char[N] ;

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

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

		for (int i = 0; i < N; i++) {
			System.out.print(list[i]);
		}
	}
} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int K = scan.nextInt();

		String S = scan.next();
		char[] list = new char[N] ;

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

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

		for (int i = 0; i < N; i++) {
			System.out.print(list[i]);
		}
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int K = scan.nextInt();

		String S = scan.next();
		char[] list = new char[N] ;

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

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

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