import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		int t = scn.nextInt() - 1;
		char[] c = scn.next().toCharArray();
		c[t] += 'a' - 'A';
		System.out.println(c);
		scn.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		int t = scn.nextInt() - 1;
		char[] c = scn.next().toCharArray();
		c[t] += 'a' - 'A';
		System.out.println(c);
		scn.close();
	}
} Main public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		int t = scn.nextInt() - 1;
		char[] c = scn.next().toCharArray();
		c[t] += 'a' - 'A';
		System.out.println(c);
		scn.close();
	} main {
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		int t = scn.nextInt() - 1;
		char[] c = scn.next().toCharArray();
		c[t] += 'a' - 'A';
		System.out.println(c);
		scn.close();
	} Scanner scn = new Scanner(System.in); scn new Scanner(System.in) int n = scn.nextInt(); n scn.nextInt() scn.nextInt scn int t = scn.nextInt() - 1; t scn.nextInt() - 1 scn.nextInt() scn.nextInt scn 1 char[] c = scn.next().toCharArray(); c scn.next().toCharArray() scn.next().toCharArray scn.next() scn.next scn c[t] += 'a' - 'A' c[t] c t 'a' - 'A' 'a' 'A' System.out.println(c) System.out.println System.out System System.out c scn.close() scn.close scn String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		int t = scn.nextInt() - 1;
		char[] c = scn.next().toCharArray();
		c[t] += 'a' - 'A';
		System.out.println(c);
		scn.close();
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		int t = scn.nextInt() - 1;
		char[] c = scn.next().toCharArray();
		c[t] += 'a' - 'A';
		System.out.println(c);
		scn.close();
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		int t = scn.nextInt() - 1;
		char[] c = scn.next().toCharArray();
		c[t] += 'a' - 'A';
		System.out.println(c);
		scn.close();
	}
}
