import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;

public class Main {
	public static void main(String args[]) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			String str = br.readLine();
			String s[] = str.split(" ");
			int n = Integer.parseInt(s[0]);
			int k = Integer.parseInt(s[1]);
			String ss = br.readLine();

			String s1 = ss.substring(0, k - 1);
			String s2 = ss.substring(k - 1, k);
			String s3 = ss.substring(k, ss.length());

			System.out.println(s1 + s2.toLowerCase() + s3);

			br.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util public class Main {
	public static void main(String args[]) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			String str = br.readLine();
			String s[] = str.split(" ");
			int n = Integer.parseInt(s[0]);
			int k = Integer.parseInt(s[1]);
			String ss = br.readLine();

			String s1 = ss.substring(0, k - 1);
			String s2 = ss.substring(k - 1, k);
			String s3 = ss.substring(k, ss.length());

			System.out.println(s1 + s2.toLowerCase() + s3);

			br.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
} Main public static void main(String args[]) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			String str = br.readLine();
			String s[] = str.split(" ");
			int n = Integer.parseInt(s[0]);
			int k = Integer.parseInt(s[1]);
			String ss = br.readLine();

			String s1 = ss.substring(0, k - 1);
			String s2 = ss.substring(k - 1, k);
			String s3 = ss.substring(k, ss.length());

			System.out.println(s1 + s2.toLowerCase() + s3);

			br.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			String str = br.readLine();
			String s[] = str.split(" ");
			int n = Integer.parseInt(s[0]);
			int k = Integer.parseInt(s[1]);
			String ss = br.readLine();

			String s1 = ss.substring(0, k - 1);
			String s2 = ss.substring(k - 1, k);
			String s3 = ss.substring(k, ss.length());

			System.out.println(s1 + s2.toLowerCase() + s3);

			br.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) try {
			String str = br.readLine();
			String s[] = str.split(" ");
			int n = Integer.parseInt(s[0]);
			int k = Integer.parseInt(s[1]);
			String ss = br.readLine();

			String s1 = ss.substring(0, k - 1);
			String s2 = ss.substring(k - 1, k);
			String s3 = ss.substring(k, ss.length());

			System.out.println(s1 + s2.toLowerCase() + s3);

			br.close();
		} catch (IOException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		} IOException e {
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e {
			String str = br.readLine();
			String s[] = str.split(" ");
			int n = Integer.parseInt(s[0]);
			int k = Integer.parseInt(s[1]);
			String ss = br.readLine();

			String s1 = ss.substring(0, k - 1);
			String s2 = ss.substring(k - 1, k);
			String s3 = ss.substring(k, ss.length());

			System.out.println(s1 + s2.toLowerCase() + s3);

			br.close();
		} String str = br.readLine(); str br.readLine() br.readLine br String s[] = str.split(" "); s str.split(" ") str.split str " " int n = Integer.parseInt(s[0]); n Integer.parseInt(s[0]) Integer.parseInt Integer s[0] s 0 int k = Integer.parseInt(s[1]); k Integer.parseInt(s[1]) Integer.parseInt Integer s[1] s 1 String ss = br.readLine(); ss br.readLine() br.readLine br String s1 = ss.substring(0, k - 1); s1 ss.substring(0, k - 1) ss.substring ss 0 k - 1 k 1 String s2 = ss.substring(k - 1, k); s2 ss.substring(k - 1, k) ss.substring ss k - 1 k 1 k String s3 = ss.substring(k, ss.length()); s3 ss.substring(k, ss.length()) ss.substring ss k ss.length() ss.length ss System.out.println(s1 + s2.toLowerCase() + s3) System.out.println System.out System System.out s1 + s2.toLowerCase() + s3 s1 + s2.toLowerCase() + s3 s1 s2.toLowerCase() s2.toLowerCase s2 s3 br.close() br.close br String args[] args public class Main {
	public static void main(String args[]) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			String str = br.readLine();
			String s[] = str.split(" ");
			int n = Integer.parseInt(s[0]);
			int k = Integer.parseInt(s[1]);
			String ss = br.readLine();

			String s1 = ss.substring(0, k - 1);
			String s2 = ss.substring(k - 1, k);
			String s3 = ss.substring(k, ss.length());

			System.out.println(s1 + s2.toLowerCase() + s3);

			br.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
} public class Main {
	public static void main(String args[]) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			String str = br.readLine();
			String s[] = str.split(" ");
			int n = Integer.parseInt(s[0]);
			int k = Integer.parseInt(s[1]);
			String ss = br.readLine();

			String s1 = ss.substring(0, k - 1);
			String s2 = ss.substring(k - 1, k);
			String s3 = ss.substring(k, ss.length());

			System.out.println(s1 + s2.toLowerCase() + s3);

			br.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;

public class Main {
	public static void main(String args[]) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			String str = br.readLine();
			String s[] = str.split(" ");
			int n = Integer.parseInt(s[0]);
			int k = Integer.parseInt(s[1]);
			String ss = br.readLine();

			String s1 = ss.substring(0, k - 1);
			String s2 = ss.substring(k - 1, k);
			String s3 = ss.substring(k, ss.length());

			System.out.println(s1 + s2.toLowerCase() + s3);

			br.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}