import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();
		sc.close();
		char[] c = new char[N];

		for (int i = 0; i < N; i++) {
			c[i] = S.charAt(i);
		}
		if (c[K - 1] == 'A') {
			c[K - 1] = 'a';
		}
		if (c[K - 1] == 'B') {
			c[K - 1] = 'b';
		}
		if (c[K - 1] == 'C') {
			c[K - 1] = 'c';
		}
		for (int i = 0; i < N; i++) {
			System.out.print(c[i]);
		}
	}
} import java.util.Scanner; Scanner java.util class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();
		sc.close();
		char[] c = new char[N];

		for (int i = 0; i < N; i++) {
			c[i] = S.charAt(i);
		}
		if (c[K - 1] == 'A') {
			c[K - 1] = 'a';
		}
		if (c[K - 1] == 'B') {
			c[K - 1] = 'b';
		}
		if (c[K - 1] == 'C') {
			c[K - 1] = 'c';
		}
		for (int i = 0; i < N; i++) {
			System.out.print(c[i]);
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();
		sc.close();
		char[] c = new char[N];

		for (int i = 0; i < N; i++) {
			c[i] = S.charAt(i);
		}
		if (c[K - 1] == 'A') {
			c[K - 1] = 'a';
		}
		if (c[K - 1] == 'B') {
			c[K - 1] = 'b';
		}
		if (c[K - 1] == 'C') {
			c[K - 1] = 'c';
		}
		for (int i = 0; i < N; i++) {
			System.out.print(c[i]);
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();
		sc.close();
		char[] c = new char[N];

		for (int i = 0; i < N; i++) {
			c[i] = S.charAt(i);
		}
		if (c[K - 1] == 'A') {
			c[K - 1] = 'a';
		}
		if (c[K - 1] == 'B') {
			c[K - 1] = 'b';
		}
		if (c[K - 1] == 'C') {
			c[K - 1] = 'c';
		}
		for (int i = 0; i < N; i++) {
			System.out.print(c[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 sc.close() sc.close sc char[] c = new char[N]; c new char[N] N for (int i = 0; i < N; i++) {
			c[i] = S.charAt(i);
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			c[i] = S.charAt(i);
		} {
			c[i] = S.charAt(i);
		} c[i] = S.charAt(i) c[i] c i S.charAt(i) S.charAt S i if (c[K - 1] == 'A') {
			c[K - 1] = 'a';
		} c[K - 1] == 'A' c[K - 1] c K - 1 K 1 'A' {
			c[K - 1] = 'a';
		} c[K - 1] = 'a' c[K - 1] c K - 1 K 1 'a' if (c[K - 1] == 'B') {
			c[K - 1] = 'b';
		} c[K - 1] == 'B' c[K - 1] c K - 1 K 1 'B' {
			c[K - 1] = 'b';
		} c[K - 1] = 'b' c[K - 1] c K - 1 K 1 'b' if (c[K - 1] == 'C') {
			c[K - 1] = 'c';
		} c[K - 1] == 'C' c[K - 1] c K - 1 K 1 'C' {
			c[K - 1] = 'c';
		} c[K - 1] = 'c' c[K - 1] c K - 1 K 1 'c' for (int i = 0; i < N; i++) {
			System.out.print(c[i]);
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			System.out.print(c[i]);
		} {
			System.out.print(c[i]);
		} System.out.print(c[i]) System.out.print System.out System System.out c[i] c i String[] args args
import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();
		sc.close();
		char[] c = new char[N];

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