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

		newStr = String.valueOf(S.toCharArray()[K - 1]).toLowerCase();

		for (int i = 0; i < N; i++) {
			if (i == K - 1) {
				System.out.print(newStr);
			} else {
				System.out.print(S.toCharArray()[i]);
			}
		}

		System.out.println();
	}
} 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();
		String newStr;

		newStr = String.valueOf(S.toCharArray()[K - 1]).toLowerCase();

		for (int i = 0; i < N; i++) {
			if (i == K - 1) {
				System.out.print(newStr);
			} else {
				System.out.print(S.toCharArray()[i]);
			}
		}

		System.out.println();
	}
} 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();
		String newStr;

		newStr = String.valueOf(S.toCharArray()[K - 1]).toLowerCase();

		for (int i = 0; i < N; i++) {
			if (i == K - 1) {
				System.out.print(newStr);
			} else {
				System.out.print(S.toCharArray()[i]);
			}
		}

		System.out.println();
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();
		String newStr;

		newStr = String.valueOf(S.toCharArray()[K - 1]).toLowerCase();

		for (int i = 0; i < N; i++) {
			if (i == K - 1) {
				System.out.print(newStr);
			} else {
				System.out.print(S.toCharArray()[i]);
			}
		}

		System.out.println();
	} 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 String newStr; newStr newStr = String.valueOf(S.toCharArray()[K - 1]).toLowerCase() newStr String.valueOf(S.toCharArray()[K - 1]).toLowerCase() String.valueOf(S.toCharArray()[K - 1]).toLowerCase String.valueOf(S.toCharArray()[K - 1]) String.valueOf String S.toCharArray()[K - 1] S.toCharArray() S.toCharArray S K - 1 K 1 for (int i = 0; i < N; i++) {
			if (i == K - 1) {
				System.out.print(newStr);
			} else {
				System.out.print(S.toCharArray()[i]);
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			if (i == K - 1) {
				System.out.print(newStr);
			} else {
				System.out.print(S.toCharArray()[i]);
			}
		} {
			if (i == K - 1) {
				System.out.print(newStr);
			} else {
				System.out.print(S.toCharArray()[i]);
			}
		} if (i == K - 1) {
				System.out.print(newStr);
			} else {
				System.out.print(S.toCharArray()[i]);
			} i == K - 1 i K - 1 K 1 {
				System.out.print(newStr);
			} System.out.print(newStr) System.out.print System.out System System.out newStr {
				System.out.print(S.toCharArray()[i]);
			} System.out.print(S.toCharArray()[i]) System.out.print System.out System System.out S.toCharArray()[i] S.toCharArray() S.toCharArray S i System.out.println() System.out.println System.out System System.out 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();
		String newStr;

		newStr = String.valueOf(S.toCharArray()[K - 1]).toLowerCase();

		for (int i = 0; i < N; i++) {
			if (i == K - 1) {
				System.out.print(newStr);
			} else {
				System.out.print(S.toCharArray()[i]);
			}
		}

		System.out.println();
	}
} 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();
		String newStr;

		newStr = String.valueOf(S.toCharArray()[K - 1]).toLowerCase();

		for (int i = 0; i < N; i++) {
			if (i == K - 1) {
				System.out.print(newStr);
			} else {
				System.out.print(S.toCharArray()[i]);
			}
		}

		System.out.println();
	}
} 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();
		String newStr;

		newStr = String.valueOf(S.toCharArray()[K - 1]).toLowerCase();

		for (int i = 0; i < N; i++) {
			if (i == K - 1) {
				System.out.print(newStr);
			} else {
				System.out.print(S.toCharArray()[i]);
			}
		}

		System.out.println();
	}
}
