import java.util.*;
import static java.lang.System.*;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		char[] list = sc.next().toCharArray();
		if (list[k - 1]== 'A')
			list[k - 1] ='a';
		if(list[k - 1] == 'B')
			list[k - 1] ='b';
		if(list[k - 1] == 'C')
		list[k - 1] = 'c';
		for(char m: list)
			out.print(m);
		
	}
} import java.util.*; util.* java import static java.lang.System.*; import static java.lang.System.*; import static java.lang.System.*; public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		char[] list = sc.next().toCharArray();
		if (list[k - 1]== 'A')
			list[k - 1] ='a';
		if(list[k - 1] == 'B')
			list[k - 1] ='b';
		if(list[k - 1] == 'C')
		list[k - 1] = 'c';
		for(char m: list)
			out.print(m);
		
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		char[] list = sc.next().toCharArray();
		if (list[k - 1]== 'A')
			list[k - 1] ='a';
		if(list[k - 1] == 'B')
			list[k - 1] ='b';
		if(list[k - 1] == 'C')
		list[k - 1] = 'c';
		for(char m: list)
			out.print(m);
		
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		char[] list = sc.next().toCharArray();
		if (list[k - 1]== 'A')
			list[k - 1] ='a';
		if(list[k - 1] == 'B')
			list[k - 1] ='b';
		if(list[k - 1] == 'C')
		list[k - 1] = 'c';
		for(char m: list)
			out.print(m);
		
	} 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 char[] list = sc.next().toCharArray(); list sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc if (list[k - 1]== 'A')
			list[k - 1] ='a'; list[k - 1]== 'A' list[k - 1] list k - 1 k 1 'A' list[k - 1] ='a' list[k - 1] list k - 1 k 1 'a' if(list[k - 1] == 'B')
			list[k - 1] ='b'; list[k - 1] == 'B' list[k - 1] list k - 1 k 1 'B' list[k - 1] ='b' list[k - 1] list k - 1 k 1 'b' if(list[k - 1] == 'C')
		list[k - 1] = 'c'; list[k - 1] == 'C' list[k - 1] list k - 1 k 1 'C' list[k - 1] = 'c' list[k - 1] list k - 1 k 1 'c' for(char m: list)
			out.print(m); char m list out.print(m); out.print(m) out.print out m String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		char[] list = sc.next().toCharArray();
		if (list[k - 1]== 'A')
			list[k - 1] ='a';
		if(list[k - 1] == 'B')
			list[k - 1] ='b';
		if(list[k - 1] == 'C')
		list[k - 1] = 'c';
		for(char m: list)
			out.print(m);
		
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		char[] list = sc.next().toCharArray();
		if (list[k - 1]== 'A')
			list[k - 1] ='a';
		if(list[k - 1] == 'B')
			list[k - 1] ='b';
		if(list[k - 1] == 'C')
		list[k - 1] = 'c';
		for(char m: list)
			out.print(m);
		
	}
} Main
import java.util.*;
import static java.lang.System.*;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		char[] list = sc.next().toCharArray();
		if (list[k - 1]== 'A')
			list[k - 1] ='a';
		if(list[k - 1] == 'B')
			list[k - 1] ='b';
		if(list[k - 1] == 'C')
		list[k - 1] = 'c';
		for(char m: list)
			out.print(m);
		
	}
}