import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int x = sc.nextInt();
		int y = sc.nextInt();
		String m = sc.next();
		
		char c[] = m.toCharArray();
		y = y -1;
		if(c[y]=='A'){
			c[y] = 'a';			
		}else if(c[y]=='B'){
			c[y] = 'b';
		}else{
			c[y] = 'c';
		}
		
		for(int i = 0;i < c.length; i++){
			System.out.print(c[i]);
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int x = sc.nextInt();
		int y = sc.nextInt();
		String m = sc.next();
		
		char c[] = m.toCharArray();
		y = y -1;
		if(c[y]=='A'){
			c[y] = 'a';			
		}else if(c[y]=='B'){
			c[y] = 'b';
		}else{
			c[y] = 'c';
		}
		
		for(int i = 0;i < c.length; i++){
			System.out.print(c[i]);
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int x = sc.nextInt();
		int y = sc.nextInt();
		String m = sc.next();
		
		char c[] = m.toCharArray();
		y = y -1;
		if(c[y]=='A'){
			c[y] = 'a';			
		}else if(c[y]=='B'){
			c[y] = 'b';
		}else{
			c[y] = 'c';
		}
		
		for(int i = 0;i < c.length; i++){
			System.out.print(c[i]);
		}
	} main {
		Scanner sc = new Scanner(System.in);
		
		int x = sc.nextInt();
		int y = sc.nextInt();
		String m = sc.next();
		
		char c[] = m.toCharArray();
		y = y -1;
		if(c[y]=='A'){
			c[y] = 'a';			
		}else if(c[y]=='B'){
			c[y] = 'b';
		}else{
			c[y] = 'c';
		}
		
		for(int i = 0;i < c.length; i++){
			System.out.print(c[i]);
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int x = sc.nextInt(); x sc.nextInt() sc.nextInt sc int y = sc.nextInt(); y sc.nextInt() sc.nextInt sc String m = sc.next(); m sc.next() sc.next sc char c[] = m.toCharArray(); c m.toCharArray() m.toCharArray m y = y -1 y y -1 y 1 if(c[y]=='A'){
			c[y] = 'a';			
		}else if(c[y]=='B'){
			c[y] = 'b';
		}else{
			c[y] = 'c';
		} c[y]=='A' c[y] c y 'A' {
			c[y] = 'a';			
		} c[y] = 'a' c[y] c y 'a' if(c[y]=='B'){
			c[y] = 'b';
		}else{
			c[y] = 'c';
		} c[y]=='B' c[y] c y 'B' {
			c[y] = 'b';
		} c[y] = 'b' c[y] c y 'b' {
			c[y] = 'c';
		} c[y] = 'c' c[y] c y 'c' for(int i = 0;i < c.length; i++){
			System.out.print(c[i]);
		} int i = 0; int i = 0; i 0 i < c.length i c.length c c.length i++ i++ i {
			System.out.print(c[i]);
		} {
			System.out.print(c[i]);
		} System.out.print(c[i]) System.out.print System.out System System.out c[i] c i String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int x = sc.nextInt();
		int y = sc.nextInt();
		String m = sc.next();
		
		char c[] = m.toCharArray();
		y = y -1;
		if(c[y]=='A'){
			c[y] = 'a';			
		}else if(c[y]=='B'){
			c[y] = 'b';
		}else{
			c[y] = 'c';
		}
		
		for(int i = 0;i < c.length; i++){
			System.out.print(c[i]);
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int x = sc.nextInt();
		int y = sc.nextInt();
		String m = sc.next();
		
		char c[] = m.toCharArray();
		y = y -1;
		if(c[y]=='A'){
			c[y] = 'a';			
		}else if(c[y]=='B'){
			c[y] = 'b';
		}else{
			c[y] = 'c';
		}
		
		for(int i = 0;i < c.length; i++){
			System.out.print(c[i]);
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int x = sc.nextInt();
		int y = sc.nextInt();
		String m = sc.next();
		
		char c[] = m.toCharArray();
		y = y -1;
		if(c[y]=='A'){
			c[y] = 'a';			
		}else if(c[y]=='B'){
			c[y] = 'b';
		}else{
			c[y] = 'c';
		}
		
		for(int i = 0;i < c.length; i++){
			System.out.print(c[i]);
		}
	}
}
