
import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();
		String[] lines = line.split(" ");

		int N = Integer.parseInt(lines[0]);
		int K = Integer.parseInt(lines[1]);

		line = sc.nextLine();
		String[] chars = line.split("");
		for(int i = 0; i < chars.length; i++) {
			if(i == K-1) {
				chars[i] = chars[i].toLowerCase();
			}
			System.out.print(chars[i]);
		}
		System.out.println();
	}

} import java.util.Scanner; Scanner java.util public class Main{

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();
		String[] lines = line.split(" ");

		int N = Integer.parseInt(lines[0]);
		int K = Integer.parseInt(lines[1]);

		line = sc.nextLine();
		String[] chars = line.split("");
		for(int i = 0; i < chars.length; i++) {
			if(i == K-1) {
				chars[i] = chars[i].toLowerCase();
			}
			System.out.print(chars[i]);
		}
		System.out.println();
	}

} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();
		String[] lines = line.split(" ");

		int N = Integer.parseInt(lines[0]);
		int K = Integer.parseInt(lines[1]);

		line = sc.nextLine();
		String[] chars = line.split("");
		for(int i = 0; i < chars.length; i++) {
			if(i == K-1) {
				chars[i] = chars[i].toLowerCase();
			}
			System.out.print(chars[i]);
		}
		System.out.println();
	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();
		String[] lines = line.split(" ");

		int N = Integer.parseInt(lines[0]);
		int K = Integer.parseInt(lines[1]);

		line = sc.nextLine();
		String[] chars = line.split("");
		for(int i = 0; i < chars.length; i++) {
			if(i == K-1) {
				chars[i] = chars[i].toLowerCase();
			}
			System.out.print(chars[i]);
		}
		System.out.println();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String line = sc.nextLine(); line sc.nextLine() sc.nextLine sc String[] lines = line.split(" "); lines line.split(" ") line.split line " " int N = Integer.parseInt(lines[0]); N Integer.parseInt(lines[0]) Integer.parseInt Integer lines[0] lines 0 int K = Integer.parseInt(lines[1]); K Integer.parseInt(lines[1]) Integer.parseInt Integer lines[1] lines 1 line = sc.nextLine() line sc.nextLine() sc.nextLine sc String[] chars = line.split(""); chars line.split("") line.split line "" for(int i = 0; i < chars.length; i++) {
			if(i == K-1) {
				chars[i] = chars[i].toLowerCase();
			}
			System.out.print(chars[i]);
		} int i = 0; int i = 0; i 0 i < chars.length i chars.length chars chars.length i++ i++ i {
			if(i == K-1) {
				chars[i] = chars[i].toLowerCase();
			}
			System.out.print(chars[i]);
		} {
			if(i == K-1) {
				chars[i] = chars[i].toLowerCase();
			}
			System.out.print(chars[i]);
		} if(i == K-1) {
				chars[i] = chars[i].toLowerCase();
			} i == K-1 i K-1 K 1 {
				chars[i] = chars[i].toLowerCase();
			} chars[i] = chars[i].toLowerCase() chars[i] chars i chars[i].toLowerCase() chars[i].toLowerCase chars[i] chars i System.out.print(chars[i]) System.out.print System.out System System.out chars[i] chars i System.out.println() System.out.println System.out System System.out String[] args args public class Main{

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();
		String[] lines = line.split(" ");

		int N = Integer.parseInt(lines[0]);
		int K = Integer.parseInt(lines[1]);

		line = sc.nextLine();
		String[] chars = line.split("");
		for(int i = 0; i < chars.length; i++) {
			if(i == K-1) {
				chars[i] = chars[i].toLowerCase();
			}
			System.out.print(chars[i]);
		}
		System.out.println();
	}

} public class Main{

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();
		String[] lines = line.split(" ");

		int N = Integer.parseInt(lines[0]);
		int K = Integer.parseInt(lines[1]);

		line = sc.nextLine();
		String[] chars = line.split("");
		for(int i = 0; i < chars.length; i++) {
			if(i == K-1) {
				chars[i] = chars[i].toLowerCase();
			}
			System.out.print(chars[i]);
		}
		System.out.println();
	}

} Main

import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();
		String[] lines = line.split(" ");

		int N = Integer.parseInt(lines[0]);
		int K = Integer.parseInt(lines[1]);

		line = sc.nextLine();
		String[] chars = line.split("");
		for(int i = 0; i < chars.length; i++) {
			if(i == K-1) {
				chars[i] = chars[i].toLowerCase();
			}
			System.out.print(chars[i]);
		}
		System.out.println();
	}

}
