import java.util.Scanner;

public 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();

		char c[] = S.toCharArray();

		c[K - 1] = Character.toLowerCase(c[K - 1]);

		for (int i = 0; i < N; i++) {
			System.out.print(c[i]);
		}
	}
} import java.util.Scanner; Scanner java.util public 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();

		char c[] = S.toCharArray();

		c[K - 1] = Character.toLowerCase(c[K - 1]);

		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();

		char c[] = S.toCharArray();

		c[K - 1] = Character.toLowerCase(c[K - 1]);

		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();

		char c[] = S.toCharArray();

		c[K - 1] = Character.toLowerCase(c[K - 1]);

		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 char c[] = S.toCharArray(); c S.toCharArray() S.toCharArray S c[K - 1] = Character.toLowerCase(c[K - 1]) c[K - 1] c K - 1 K 1 Character.toLowerCase(c[K - 1]) Character.toLowerCase Character c[K - 1] c K - 1 K 1 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 public 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();

		char c[] = S.toCharArray();

		c[K - 1] = Character.toLowerCase(c[K - 1]);

		for (int i = 0; i < N; i++) {
			System.out.print(c[i]);
		}
	}
} public 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();

		char c[] = S.toCharArray();

		c[K - 1] = Character.toLowerCase(c[K - 1]);

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

public 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();

		char c[] = S.toCharArray();

		c[K - 1] = Character.toLowerCase(c[K - 1]);

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