import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt(), K = sc.nextInt();
		char[] li = sc.next().toCharArray();
		if(li[K-1] == 'A')li[K-1] = 'a';
		else if(li[K-1] == 'B') li[K-1] = 'b';
		else li[K-1] = 'c';
		System.out.println(String.valueOf(li));
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt(), K = sc.nextInt();
		char[] li = sc.next().toCharArray();
		if(li[K-1] == 'A')li[K-1] = 'a';
		else if(li[K-1] == 'B') li[K-1] = 'b';
		else li[K-1] = 'c';
		System.out.println(String.valueOf(li));
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt(), K = sc.nextInt();
		char[] li = sc.next().toCharArray();
		if(li[K-1] == 'A')li[K-1] = 'a';
		else if(li[K-1] == 'B') li[K-1] = 'b';
		else li[K-1] = 'c';
		System.out.println(String.valueOf(li));
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt(), K = sc.nextInt();
		char[] li = sc.next().toCharArray();
		if(li[K-1] == 'A')li[K-1] = 'a';
		else if(li[K-1] == 'B') li[K-1] = 'b';
		else li[K-1] = 'c';
		System.out.println(String.valueOf(li));
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt() N sc.nextInt() sc.nextInt sc K = sc.nextInt(); K sc.nextInt() sc.nextInt sc char[] li = sc.next().toCharArray(); li sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc if(li[K-1] == 'A')li[K-1] = 'a';
		else if(li[K-1] == 'B') li[K-1] = 'b';
		else li[K-1] = 'c'; li[K-1] == 'A' li[K-1] li K-1 K 1 'A' li[K-1] = 'a' li[K-1] li K-1 K 1 'a' if(li[K-1] == 'B') li[K-1] = 'b';
		else li[K-1] = 'c'; li[K-1] == 'B' li[K-1] li K-1 K 1 'B' li[K-1] = 'b' li[K-1] li K-1 K 1 'b' li[K-1] = 'c' li[K-1] li K-1 K 1 'c' System.out.println(String.valueOf(li)) System.out.println System.out System System.out String.valueOf(li) String.valueOf String li String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt(), K = sc.nextInt();
		char[] li = sc.next().toCharArray();
		if(li[K-1] == 'A')li[K-1] = 'a';
		else if(li[K-1] == 'B') li[K-1] = 'b';
		else li[K-1] = 'c';
		System.out.println(String.valueOf(li));
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt(), K = sc.nextInt();
		char[] li = sc.next().toCharArray();
		if(li[K-1] == 'A')li[K-1] = 'a';
		else if(li[K-1] == 'B') li[K-1] = 'b';
		else li[K-1] = 'c';
		System.out.println(String.valueOf(li));
	}
} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt(), K = sc.nextInt();
		char[] li = sc.next().toCharArray();
		if(li[K-1] == 'A')li[K-1] = 'a';
		else if(li[K-1] == 'B') li[K-1] = 'b';
		else li[K-1] = 'c';
		System.out.println(String.valueOf(li));
	}
}