import java.io.FileNotFoundException;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws FileNotFoundException {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int K = sc.nextInt();

		String S = sc.next();

		char[] s = S.toCharArray();

		for(int i=0;i<S.length();i++) {
			if(i==K-1) {
				s[i] = Character.toLowerCase(s[i]);
			}
		}
		S = new String(s);
		System.out.println(S);
	}
} import java.io.FileNotFoundException; FileNotFoundException java.io import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) throws FileNotFoundException {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int K = sc.nextInt();

		String S = sc.next();

		char[] s = S.toCharArray();

		for(int i=0;i<S.length();i++) {
			if(i==K-1) {
				s[i] = Character.toLowerCase(s[i]);
			}
		}
		S = new String(s);
		System.out.println(S);
	}
} Main public static void main(String[] args) throws FileNotFoundException {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int K = sc.nextInt();

		String S = sc.next();

		char[] s = S.toCharArray();

		for(int i=0;i<S.length();i++) {
			if(i==K-1) {
				s[i] = Character.toLowerCase(s[i]);
			}
		}
		S = new String(s);
		System.out.println(S);
	} main {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int K = sc.nextInt();

		String S = sc.next();

		char[] s = S.toCharArray();

		for(int i=0;i<S.length();i++) {
			if(i==K-1) {
				s[i] = Character.toLowerCase(s[i]);
			}
		}
		S = new String(s);
		System.out.println(S);
	} 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 char[] s = S.toCharArray(); s S.toCharArray() S.toCharArray S for(int i=0;i<S.length();i++) {
			if(i==K-1) {
				s[i] = Character.toLowerCase(s[i]);
			}
		} int i=0; int i=0; i 0 i<S.length() i S.length() S.length S i++ i++ i {
			if(i==K-1) {
				s[i] = Character.toLowerCase(s[i]);
			}
		} {
			if(i==K-1) {
				s[i] = Character.toLowerCase(s[i]);
			}
		} if(i==K-1) {
				s[i] = Character.toLowerCase(s[i]);
			} i==K-1 i K-1 K 1 {
				s[i] = Character.toLowerCase(s[i]);
			} s[i] = Character.toLowerCase(s[i]) s[i] s i Character.toLowerCase(s[i]) Character.toLowerCase Character s[i] s i S = new String(s) S new String(s) System.out.println(S) System.out.println System.out System System.out S String[] args args public class Main {
	public static void main(String[] args) throws FileNotFoundException {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int K = sc.nextInt();

		String S = sc.next();

		char[] s = S.toCharArray();

		for(int i=0;i<S.length();i++) {
			if(i==K-1) {
				s[i] = Character.toLowerCase(s[i]);
			}
		}
		S = new String(s);
		System.out.println(S);
	}
} public class Main {
	public static void main(String[] args) throws FileNotFoundException {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int K = sc.nextInt();

		String S = sc.next();

		char[] s = S.toCharArray();

		for(int i=0;i<S.length();i++) {
			if(i==K-1) {
				s[i] = Character.toLowerCase(s[i]);
			}
		}
		S = new String(s);
		System.out.println(S);
	}
} Main
import java.io.FileNotFoundException;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws FileNotFoundException {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int K = sc.nextInt();

		String S = sc.next();

		char[] s = S.toCharArray();

		for(int i=0;i<S.length();i++) {
			if(i==K-1) {
				s[i] = Character.toLowerCase(s[i]);
			}
		}
		S = new String(s);
		System.out.println(S);
	}
}
