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();
		sc.close();

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

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

		for(int i = 0; i < N; i++) {
			if(i == K-1) {
				String ans = String.valueOf(S.charAt(K - 1)).toLowerCase();
				System.out.print(ans);
			}else {
				System.out.print(S.charAt(i));
			}
		}
	} main {

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();
		sc.close();

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

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

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

		for(int i = 0; i < N; i++) {
			if(i == K-1) {
				String ans = String.valueOf(S.charAt(K - 1)).toLowerCase();
				System.out.print(ans);
			}else {
				System.out.print(S.charAt(i));
			}
		}
	}
}