import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;


public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] tmp = br.readLine().split(" ");

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

		String S = br.readLine();

		for(int i = 0;i<N;i++){
			if(i+1 == K){
				int a = (int)S.charAt(i) + 32;
				byte[] ascii = {Byte.parseByte(String.valueOf(a))};
				String resultString = new String(ascii, "US-ASCII");
				System.out.print(resultString);
			}else{
				System.out.print(S.charAt(i));
			}
		}



	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] tmp = br.readLine().split(" ");

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

		String S = br.readLine();

		for(int i = 0;i<N;i++){
			if(i+1 == K){
				int a = (int)S.charAt(i) + 32;
				byte[] ascii = {Byte.parseByte(String.valueOf(a))};
				String resultString = new String(ascii, "US-ASCII");
				System.out.print(resultString);
			}else{
				System.out.print(S.charAt(i));
			}
		}



	}

} Main public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] tmp = br.readLine().split(" ");

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

		String S = br.readLine();

		for(int i = 0;i<N;i++){
			if(i+1 == K){
				int a = (int)S.charAt(i) + 32;
				byte[] ascii = {Byte.parseByte(String.valueOf(a))};
				String resultString = new String(ascii, "US-ASCII");
				System.out.print(resultString);
			}else{
				System.out.print(S.charAt(i));
			}
		}



	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] tmp = br.readLine().split(" ");

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

		String S = br.readLine();

		for(int i = 0;i<N;i++){
			if(i+1 == K){
				int a = (int)S.charAt(i) + 32;
				byte[] ascii = {Byte.parseByte(String.valueOf(a))};
				String resultString = new String(ascii, "US-ASCII");
				System.out.print(resultString);
			}else{
				System.out.print(S.charAt(i));
			}
		}



	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] tmp = br.readLine().split(" "); tmp br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int N = Integer.parseInt(tmp[0]); N Integer.parseInt(tmp[0]) Integer.parseInt Integer tmp[0] tmp 0 int K = Integer.parseInt(tmp[1]); K Integer.parseInt(tmp[1]) Integer.parseInt Integer tmp[1] tmp 1 String S = br.readLine(); S br.readLine() br.readLine br for(int i = 0;i<N;i++){
			if(i+1 == K){
				int a = (int)S.charAt(i) + 32;
				byte[] ascii = {Byte.parseByte(String.valueOf(a))};
				String resultString = new String(ascii, "US-ASCII");
				System.out.print(resultString);
			}else{
				System.out.print(S.charAt(i));
			}
		} int i = 0; int i = 0; i 0 i<N i N i++ i++ i {
			if(i+1 == K){
				int a = (int)S.charAt(i) + 32;
				byte[] ascii = {Byte.parseByte(String.valueOf(a))};
				String resultString = new String(ascii, "US-ASCII");
				System.out.print(resultString);
			}else{
				System.out.print(S.charAt(i));
			}
		} {
			if(i+1 == K){
				int a = (int)S.charAt(i) + 32;
				byte[] ascii = {Byte.parseByte(String.valueOf(a))};
				String resultString = new String(ascii, "US-ASCII");
				System.out.print(resultString);
			}else{
				System.out.print(S.charAt(i));
			}
		} if(i+1 == K){
				int a = (int)S.charAt(i) + 32;
				byte[] ascii = {Byte.parseByte(String.valueOf(a))};
				String resultString = new String(ascii, "US-ASCII");
				System.out.print(resultString);
			}else{
				System.out.print(S.charAt(i));
			} i+1 == K i+1 i 1 K {
				int a = (int)S.charAt(i) + 32;
				byte[] ascii = {Byte.parseByte(String.valueOf(a))};
				String resultString = new String(ascii, "US-ASCII");
				System.out.print(resultString);
			} int a = (int)S.charAt(i) + 32; a (int)S.charAt(i) + 32 (int)S.charAt(i) S.charAt S i 32 byte[] ascii = {Byte.parseByte(String.valueOf(a))}; ascii {Byte.parseByte(String.valueOf(a))} Byte.parseByte(String.valueOf(a)) Byte.parseByte Byte String.valueOf(a) String.valueOf String a String resultString = new String(ascii, "US-ASCII"); resultString new String(ascii, "US-ASCII") System.out.print(resultString) System.out.print System.out System System.out resultString {
				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) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] tmp = br.readLine().split(" ");

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

		String S = br.readLine();

		for(int i = 0;i<N;i++){
			if(i+1 == K){
				int a = (int)S.charAt(i) + 32;
				byte[] ascii = {Byte.parseByte(String.valueOf(a))};
				String resultString = new String(ascii, "US-ASCII");
				System.out.print(resultString);
			}else{
				System.out.print(S.charAt(i));
			}
		}



	}

} public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] tmp = br.readLine().split(" ");

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

		String S = br.readLine();

		for(int i = 0;i<N;i++){
			if(i+1 == K){
				int a = (int)S.charAt(i) + 32;
				byte[] ascii = {Byte.parseByte(String.valueOf(a))};
				String resultString = new String(ascii, "US-ASCII");
				System.out.print(resultString);
			}else{
				System.out.print(S.charAt(i));
			}
		}



	}

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;


public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] tmp = br.readLine().split(" ");

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

		String S = br.readLine();

		for(int i = 0;i<N;i++){
			if(i+1 == K){
				int a = (int)S.charAt(i) + 32;
				byte[] ascii = {Byte.parseByte(String.valueOf(a))};
				String resultString = new String(ascii, "US-ASCII");
				System.out.print(resultString);
			}else{
				System.out.print(S.charAt(i));
			}
		}



	}

}