import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int K = scanner.nextInt();
		String S = scanner.next();
		String str = S;
		String[] S1 = str.split("");
		
		String S2 = S1[K - 1].toLowerCase();
		
		for (int i = 0; i < K - 1; i++) {
			System.out.print(S1[i]);
		}
		
		System.out.print(S2);
		
		for (int j = K; j < N; j++) {
			System.out.print(S1[j]);
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int K = scanner.nextInt();
		String S = scanner.next();
		String str = S;
		String[] S1 = str.split("");
		
		String S2 = S1[K - 1].toLowerCase();
		
		for (int i = 0; i < K - 1; i++) {
			System.out.print(S1[i]);
		}
		
		System.out.print(S2);
		
		for (int j = K; j < N; j++) {
			System.out.print(S1[j]);
		}
	}
} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int K = scanner.nextInt();
		String S = scanner.next();
		String str = S;
		String[] S1 = str.split("");
		
		String S2 = S1[K - 1].toLowerCase();
		
		for (int i = 0; i < K - 1; i++) {
			System.out.print(S1[i]);
		}
		
		System.out.print(S2);
		
		for (int j = K; j < N; j++) {
			System.out.print(S1[j]);
		}
	} main {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int K = scanner.nextInt();
		String S = scanner.next();
		String str = S;
		String[] S1 = str.split("");
		
		String S2 = S1[K - 1].toLowerCase();
		
		for (int i = 0; i < K - 1; i++) {
			System.out.print(S1[i]);
		}
		
		System.out.print(S2);
		
		for (int j = K; j < N; j++) {
			System.out.print(S1[j]);
		}
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner int K = scanner.nextInt(); K scanner.nextInt() scanner.nextInt scanner String S = scanner.next(); S scanner.next() scanner.next scanner String str = S; str S String[] S1 = str.split(""); S1 str.split("") str.split str "" String S2 = S1[K - 1].toLowerCase(); S2 S1[K - 1].toLowerCase() S1[K - 1].toLowerCase S1[K - 1] S1 K - 1 K 1 for (int i = 0; i < K - 1; i++) {
			System.out.print(S1[i]);
		} int i = 0; int i = 0; i 0 i < K - 1 i K - 1 K 1 i++ i++ i {
			System.out.print(S1[i]);
		} {
			System.out.print(S1[i]);
		} System.out.print(S1[i]) System.out.print System.out System System.out S1[i] S1 i System.out.print(S2) System.out.print System.out System System.out S2 for (int j = K; j < N; j++) {
			System.out.print(S1[j]);
		} int j = K; int j = K; j K j < N j N j++ j++ j {
			System.out.print(S1[j]);
		} {
			System.out.print(S1[j]);
		} System.out.print(S1[j]) System.out.print System.out System System.out S1[j] S1 j String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int K = scanner.nextInt();
		String S = scanner.next();
		String str = S;
		String[] S1 = str.split("");
		
		String S2 = S1[K - 1].toLowerCase();
		
		for (int i = 0; i < K - 1; i++) {
			System.out.print(S1[i]);
		}
		
		System.out.print(S2);
		
		for (int j = K; j < N; j++) {
			System.out.print(S1[j]);
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int K = scanner.nextInt();
		String S = scanner.next();
		String str = S;
		String[] S1 = str.split("");
		
		String S2 = S1[K - 1].toLowerCase();
		
		for (int i = 0; i < K - 1; i++) {
			System.out.print(S1[i]);
		}
		
		System.out.print(S2);
		
		for (int j = K; j < N; j++) {
			System.out.print(S1[j]);
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int K = scanner.nextInt();
		String S = scanner.next();
		String str = S;
		String[] S1 = str.split("");
		
		String S2 = S1[K - 1].toLowerCase();
		
		for (int i = 0; i < K - 1; i++) {
			System.out.print(S1[i]);
		}
		
		System.out.print(S2);
		
		for (int j = K; j < N; j++) {
			System.out.print(S1[j]);
		}
	}
}