import java.util.Scanner;

//AtCoder Beginner Contest 126
//A	Changing a Character
public class Main {

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

		sc.close();

		String ans = "";
		for (int i = 0; i < N; i++) {
			if (i == K - 1) {
				ans = ans + String.valueOf((char)(S.charAt(i) + 32));
			} else {
				ans = ans + S.charAt(i);
			}

		}
		System.out.print(ans);
	}
} 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();
		sc.nextLine();
		String S = sc.nextLine();

		sc.close();

		String ans = "";
		for (int i = 0; i < N; i++) {
			if (i == K - 1) {
				ans = ans + String.valueOf((char)(S.charAt(i) + 32));
			} else {
				ans = ans + S.charAt(i);
			}

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

		sc.close();

		String ans = "";
		for (int i = 0; i < N; i++) {
			if (i == K - 1) {
				ans = ans + String.valueOf((char)(S.charAt(i) + 32));
			} else {
				ans = ans + S.charAt(i);
			}

		}
		System.out.print(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		sc.nextLine();
		String S = sc.nextLine();

		sc.close();

		String ans = "";
		for (int i = 0; i < N; i++) {
			if (i == K - 1) {
				ans = ans + String.valueOf((char)(S.charAt(i) + 32));
			} else {
				ans = ans + S.charAt(i);
			}

		}
		System.out.print(ans);
	} 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 sc.nextLine() sc.nextLine sc String S = sc.nextLine(); S sc.nextLine() sc.nextLine sc sc.close() sc.close sc String ans = ""; ans "" for (int i = 0; i < N; i++) {
			if (i == K - 1) {
				ans = ans + String.valueOf((char)(S.charAt(i) + 32));
			} else {
				ans = ans + S.charAt(i);
			}

		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			if (i == K - 1) {
				ans = ans + String.valueOf((char)(S.charAt(i) + 32));
			} else {
				ans = ans + S.charAt(i);
			}

		} {
			if (i == K - 1) {
				ans = ans + String.valueOf((char)(S.charAt(i) + 32));
			} else {
				ans = ans + S.charAt(i);
			}

		} if (i == K - 1) {
				ans = ans + String.valueOf((char)(S.charAt(i) + 32));
			} else {
				ans = ans + S.charAt(i);
			} i == K - 1 i K - 1 K 1 {
				ans = ans + String.valueOf((char)(S.charAt(i) + 32));
			} ans = ans + String.valueOf((char)(S.charAt(i) + 32)) ans ans + String.valueOf((char)(S.charAt(i) + 32)) ans String.valueOf((char)(S.charAt(i) + 32)) String.valueOf String (char)(S.charAt(i) + 32) S.charAt(i) S.charAt S i 32 {
				ans = ans + S.charAt(i);
			} ans = ans + S.charAt(i) ans ans + S.charAt(i) ans S.charAt(i) S.charAt S i System.out.print(ans) System.out.print System.out System System.out ans 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();
		sc.nextLine();
		String S = sc.nextLine();

		sc.close();

		String ans = "";
		for (int i = 0; i < N; i++) {
			if (i == K - 1) {
				ans = ans + String.valueOf((char)(S.charAt(i) + 32));
			} else {
				ans = ans + S.charAt(i);
			}

		}
		System.out.print(ans);
	}
} public class Main {

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

		sc.close();

		String ans = "";
		for (int i = 0; i < N; i++) {
			if (i == K - 1) {
				ans = ans + String.valueOf((char)(S.charAt(i) + 32));
			} else {
				ans = ans + S.charAt(i);
			}

		}
		System.out.print(ans);
	}
} Main
import java.util.Scanner;

//AtCoder Beginner Contest 126
//A	Changing a Character
public class Main {

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

		sc.close();

		String ans = "";
		for (int i = 0; i < N; i++) {
			if (i == K - 1) {
				ans = ans + String.valueOf((char)(S.charAt(i) + 32));
			} else {
				ans = ans + S.charAt(i);
			}

		}
		System.out.print(ans);
	}
}
