import java.util.Scanner;

public class Main {
	static Scanner sc = new Scanner(System.in);
	static int N;
	static int K;

	public static void main(String[] args) {
		N = sc.nextInt();
		K = sc.nextInt();

		char[] S = sc.next().toCharArray();
		if (S[K - 1] == 'A') {
			S[K - 1] = 'a';
		} else if (S[K - 1] == 'B') {
			S[K - 1] = 'b';
		} else if (S[K - 1] == 'C') {
			S[K - 1] = 'c';
		}

		System.out.println(S);
	}

} import java.util.Scanner; Scanner java.util public class Main {
	static Scanner sc = new Scanner(System.in);
	static int N;
	static int K;

	public static void main(String[] args) {
		N = sc.nextInt();
		K = sc.nextInt();

		char[] S = sc.next().toCharArray();
		if (S[K - 1] == 'A') {
			S[K - 1] = 'a';
		} else if (S[K - 1] == 'B') {
			S[K - 1] = 'b';
		} else if (S[K - 1] == 'C') {
			S[K - 1] = 'c';
		}

		System.out.println(S);
	}

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

		char[] S = sc.next().toCharArray();
		if (S[K - 1] == 'A') {
			S[K - 1] = 'a';
		} else if (S[K - 1] == 'B') {
			S[K - 1] = 'b';
		} else if (S[K - 1] == 'C') {
			S[K - 1] = 'c';
		}

		System.out.println(S);
	} main {
		N = sc.nextInt();
		K = sc.nextInt();

		char[] S = sc.next().toCharArray();
		if (S[K - 1] == 'A') {
			S[K - 1] = 'a';
		} else if (S[K - 1] == 'B') {
			S[K - 1] = 'b';
		} else if (S[K - 1] == 'C') {
			S[K - 1] = 'c';
		}

		System.out.println(S);
	} N = sc.nextInt() N sc.nextInt() sc.nextInt sc K = sc.nextInt() K sc.nextInt() sc.nextInt sc char[] S = sc.next().toCharArray(); S sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc if (S[K - 1] == 'A') {
			S[K - 1] = 'a';
		} else if (S[K - 1] == 'B') {
			S[K - 1] = 'b';
		} else if (S[K - 1] == 'C') {
			S[K - 1] = 'c';
		} S[K - 1] == 'A' S[K - 1] S K - 1 K 1 'A' {
			S[K - 1] = 'a';
		} S[K - 1] = 'a' S[K - 1] S K - 1 K 1 'a' if (S[K - 1] == 'B') {
			S[K - 1] = 'b';
		} else if (S[K - 1] == 'C') {
			S[K - 1] = 'c';
		} S[K - 1] == 'B' S[K - 1] S K - 1 K 1 'B' {
			S[K - 1] = 'b';
		} S[K - 1] = 'b' S[K - 1] S K - 1 K 1 'b' if (S[K - 1] == 'C') {
			S[K - 1] = 'c';
		} S[K - 1] == 'C' S[K - 1] S K - 1 K 1 'C' {
			S[K - 1] = 'c';
		} S[K - 1] = 'c' S[K - 1] S K - 1 K 1 'c' System.out.println(S) System.out.println System.out System System.out S String[] args args public class Main {
	static Scanner sc = new Scanner(System.in);
	static int N;
	static int K;

	public static void main(String[] args) {
		N = sc.nextInt();
		K = sc.nextInt();

		char[] S = sc.next().toCharArray();
		if (S[K - 1] == 'A') {
			S[K - 1] = 'a';
		} else if (S[K - 1] == 'B') {
			S[K - 1] = 'b';
		} else if (S[K - 1] == 'C') {
			S[K - 1] = 'c';
		}

		System.out.println(S);
	}

} public class Main {
	static Scanner sc = new Scanner(System.in);
	static int N;
	static int K;

	public static void main(String[] args) {
		N = sc.nextInt();
		K = sc.nextInt();

		char[] S = sc.next().toCharArray();
		if (S[K - 1] == 'A') {
			S[K - 1] = 'a';
		} else if (S[K - 1] == 'B') {
			S[K - 1] = 'b';
		} else if (S[K - 1] == 'C') {
			S[K - 1] = 'c';
		}

		System.out.println(S);
	}

} Main
import java.util.Scanner;

public class Main {
	static Scanner sc = new Scanner(System.in);
	static int N;
	static int K;

	public static void main(String[] args) {
		N = sc.nextInt();
		K = sc.nextInt();

		char[] S = sc.next().toCharArray();
		if (S[K - 1] == 'A') {
			S[K - 1] = 'a';
		} else if (S[K - 1] == 'B') {
			S[K - 1] = 'b';
		} else if (S[K - 1] == 'C') {
			S[K - 1] = 'c';
		}

		System.out.println(S);
	}

}