import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int k = in.nextInt();
		String s = in.next();
		if(s.charAt(k-1)=='A') System.out.println(s.substring(0, k-1)+"a"+s.substring(k,n));
		else if(s.charAt(k-1)=='B') System.out.println(s.substring(0, k-1)+"b"+s.substring(k,n));
		else if(s.charAt(k-1)=='C') System.out.println(s.substring(0, k-1)+"c"+s.substring(k,n));
		in.close();
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int k = in.nextInt();
		String s = in.next();
		if(s.charAt(k-1)=='A') System.out.println(s.substring(0, k-1)+"a"+s.substring(k,n));
		else if(s.charAt(k-1)=='B') System.out.println(s.substring(0, k-1)+"b"+s.substring(k,n));
		else if(s.charAt(k-1)=='C') System.out.println(s.substring(0, k-1)+"c"+s.substring(k,n));
		in.close();
	}

} Main public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int k = in.nextInt();
		String s = in.next();
		if(s.charAt(k-1)=='A') System.out.println(s.substring(0, k-1)+"a"+s.substring(k,n));
		else if(s.charAt(k-1)=='B') System.out.println(s.substring(0, k-1)+"b"+s.substring(k,n));
		else if(s.charAt(k-1)=='C') System.out.println(s.substring(0, k-1)+"c"+s.substring(k,n));
		in.close();
	} main {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int k = in.nextInt();
		String s = in.next();
		if(s.charAt(k-1)=='A') System.out.println(s.substring(0, k-1)+"a"+s.substring(k,n));
		else if(s.charAt(k-1)=='B') System.out.println(s.substring(0, k-1)+"b"+s.substring(k,n));
		else if(s.charAt(k-1)=='C') System.out.println(s.substring(0, k-1)+"c"+s.substring(k,n));
		in.close();
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) int n = in.nextInt(); n in.nextInt() in.nextInt in int k = in.nextInt(); k in.nextInt() in.nextInt in String s = in.next(); s in.next() in.next in if(s.charAt(k-1)=='A') System.out.println(s.substring(0, k-1)+"a"+s.substring(k,n));
		else if(s.charAt(k-1)=='B') System.out.println(s.substring(0, k-1)+"b"+s.substring(k,n));
		else if(s.charAt(k-1)=='C') System.out.println(s.substring(0, k-1)+"c"+s.substring(k,n)); s.charAt(k-1)=='A' s.charAt(k-1) s.charAt s k-1 k 1 'A' System.out.println(s.substring(0, k-1)+"a"+s.substring(k,n)) System.out.println System.out System System.out s.substring(0, k-1)+"a"+s.substring(k,n) s.substring(0, k-1)+"a"+s.substring(k,n) s.substring(0, k-1) s.substring s 0 k-1 k 1 "a" s.substring(k,n) s.substring s k n if(s.charAt(k-1)=='B') System.out.println(s.substring(0, k-1)+"b"+s.substring(k,n));
		else if(s.charAt(k-1)=='C') System.out.println(s.substring(0, k-1)+"c"+s.substring(k,n)); s.charAt(k-1)=='B' s.charAt(k-1) s.charAt s k-1 k 1 'B' System.out.println(s.substring(0, k-1)+"b"+s.substring(k,n)) System.out.println System.out System System.out s.substring(0, k-1)+"b"+s.substring(k,n) s.substring(0, k-1)+"b"+s.substring(k,n) s.substring(0, k-1) s.substring s 0 k-1 k 1 "b" s.substring(k,n) s.substring s k n if(s.charAt(k-1)=='C') System.out.println(s.substring(0, k-1)+"c"+s.substring(k,n)); s.charAt(k-1)=='C' s.charAt(k-1) s.charAt s k-1 k 1 'C' System.out.println(s.substring(0, k-1)+"c"+s.substring(k,n)) System.out.println System.out System System.out s.substring(0, k-1)+"c"+s.substring(k,n) s.substring(0, k-1)+"c"+s.substring(k,n) s.substring(0, k-1) s.substring s 0 k-1 k 1 "c" s.substring(k,n) s.substring s k n in.close() in.close in String[] args args public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int k = in.nextInt();
		String s = in.next();
		if(s.charAt(k-1)=='A') System.out.println(s.substring(0, k-1)+"a"+s.substring(k,n));
		else if(s.charAt(k-1)=='B') System.out.println(s.substring(0, k-1)+"b"+s.substring(k,n));
		else if(s.charAt(k-1)=='C') System.out.println(s.substring(0, k-1)+"c"+s.substring(k,n));
		in.close();
	}

} public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int k = in.nextInt();
		String s = in.next();
		if(s.charAt(k-1)=='A') System.out.println(s.substring(0, k-1)+"a"+s.substring(k,n));
		else if(s.charAt(k-1)=='B') System.out.println(s.substring(0, k-1)+"b"+s.substring(k,n));
		else if(s.charAt(k-1)=='C') System.out.println(s.substring(0, k-1)+"c"+s.substring(k,n));
		in.close();
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int k = in.nextInt();
		String s = in.next();
		if(s.charAt(k-1)=='A') System.out.println(s.substring(0, k-1)+"a"+s.substring(k,n));
		else if(s.charAt(k-1)=='B') System.out.println(s.substring(0, k-1)+"b"+s.substring(k,n));
		else if(s.charAt(k-1)=='C') System.out.println(s.substring(0, k-1)+"c"+s.substring(k,n));
		in.close();
	}

}
