import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		
		try (Scanner sc = new Scanner(System.in)) {
			
			int n = sc.nextInt();
			int k = sc.nextInt();
			String s = sc.next();
			String tmp = null;
			
			switch (s.substring(k-1,k)) {
			case "A":
				tmp = "a";
				break;
			case "B":
				tmp = "b";
				break;
			case "C":
				tmp = "c";
				break;
			}
			
			System.out.println(s.substring(0,k-1) + tmp + s.substring(k));	
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		
		try (Scanner sc = new Scanner(System.in)) {
			
			int n = sc.nextInt();
			int k = sc.nextInt();
			String s = sc.next();
			String tmp = null;
			
			switch (s.substring(k-1,k)) {
			case "A":
				tmp = "a";
				break;
			case "B":
				tmp = "b";
				break;
			case "C":
				tmp = "c";
				break;
			}
			
			System.out.println(s.substring(0,k-1) + tmp + s.substring(k));	
		}
	}
} Main public static void main(String[] args) {
		
		try (Scanner sc = new Scanner(System.in)) {
			
			int n = sc.nextInt();
			int k = sc.nextInt();
			String s = sc.next();
			String tmp = null;
			
			switch (s.substring(k-1,k)) {
			case "A":
				tmp = "a";
				break;
			case "B":
				tmp = "b";
				break;
			case "C":
				tmp = "c";
				break;
			}
			
			System.out.println(s.substring(0,k-1) + tmp + s.substring(k));	
		}
	} main {
		
		try (Scanner sc = new Scanner(System.in)) {
			
			int n = sc.nextInt();
			int k = sc.nextInt();
			String s = sc.next();
			String tmp = null;
			
			switch (s.substring(k-1,k)) {
			case "A":
				tmp = "a";
				break;
			case "B":
				tmp = "b";
				break;
			case "C":
				tmp = "c";
				break;
			}
			
			System.out.println(s.substring(0,k-1) + tmp + s.substring(k));	
		}
	} try (Scanner sc = new Scanner(System.in)) {
			
			int n = sc.nextInt();
			int k = sc.nextInt();
			String s = sc.next();
			String tmp = null;
			
			switch (s.substring(k-1,k)) {
			case "A":
				tmp = "a";
				break;
			case "B":
				tmp = "b";
				break;
			case "C":
				tmp = "c";
				break;
			}
			
			System.out.println(s.substring(0,k-1) + tmp + s.substring(k));	
		} {
			
			int n = sc.nextInt();
			int k = sc.nextInt();
			String s = sc.next();
			String tmp = null;
			
			switch (s.substring(k-1,k)) {
			case "A":
				tmp = "a";
				break;
			case "B":
				tmp = "b";
				break;
			case "C":
				tmp = "c";
				break;
			}
			
			System.out.println(s.substring(0,k-1) + tmp + s.substring(k));	
		} Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int k = sc.nextInt(); k sc.nextInt() sc.nextInt sc String s = sc.next(); s sc.next() sc.next sc String tmp = null; tmp null switch (s.substring(k-1,k)) {
			case "A":
				tmp = "a";
				break;
			case "B":
				tmp = "b";
				break;
			case "C":
				tmp = "c";
				break;
			} s.substring(k-1,k) s.substring s k-1 k 1 k case "A": "A" case "A": tmp = "a" tmp "a" break; case "B": "B" case "B": tmp = "b" tmp "b" break; case "C": "C" case "C": tmp = "c" tmp "c" break; System.out.println(s.substring(0,k-1) + tmp + s.substring(k)) System.out.println System.out System System.out s.substring(0,k-1) + tmp + s.substring(k) s.substring(0,k-1) + tmp + s.substring(k) s.substring(0,k-1) s.substring s 0 k-1 k 1 tmp s.substring(k) s.substring s k String[] args args public class Main {

	public static void main(String[] args) {
		
		try (Scanner sc = new Scanner(System.in)) {
			
			int n = sc.nextInt();
			int k = sc.nextInt();
			String s = sc.next();
			String tmp = null;
			
			switch (s.substring(k-1,k)) {
			case "A":
				tmp = "a";
				break;
			case "B":
				tmp = "b";
				break;
			case "C":
				tmp = "c";
				break;
			}
			
			System.out.println(s.substring(0,k-1) + tmp + s.substring(k));	
		}
	}
} public class Main {

	public static void main(String[] args) {
		
		try (Scanner sc = new Scanner(System.in)) {
			
			int n = sc.nextInt();
			int k = sc.nextInt();
			String s = sc.next();
			String tmp = null;
			
			switch (s.substring(k-1,k)) {
			case "A":
				tmp = "a";
				break;
			case "B":
				tmp = "b";
				break;
			case "C":
				tmp = "c";
				break;
			}
			
			System.out.println(s.substring(0,k-1) + tmp + s.substring(k));	
		}
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		
		try (Scanner sc = new Scanner(System.in)) {
			
			int n = sc.nextInt();
			int k = sc.nextInt();
			String s = sc.next();
			String tmp = null;
			
			switch (s.substring(k-1,k)) {
			case "A":
				tmp = "a";
				break;
			case "B":
				tmp = "b";
				break;
			case "C":
				tmp = "c";
				break;
			}
			
			System.out.println(s.substring(0,k-1) + tmp + s.substring(k));	
		}
	}
}