import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();
		StringBuilder ans =new StringBuilder(S);
		if(S.charAt(K-1)=='A'){		
			ans.setCharAt((K-1), 'a');
		}
		if(S.charAt(K-1)=='B'){		
			ans.setCharAt((K-1), 'b');
		}
		if(S.charAt(K-1)=='C'){		
			ans.setCharAt((K-1), 'c');
		}

		System.out.println(ans);	
		}
	} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();
		StringBuilder ans =new StringBuilder(S);
		if(S.charAt(K-1)=='A'){		
			ans.setCharAt((K-1), 'a');
		}
		if(S.charAt(K-1)=='B'){		
			ans.setCharAt((K-1), 'b');
		}
		if(S.charAt(K-1)=='C'){		
			ans.setCharAt((K-1), 'c');
		}

		System.out.println(ans);	
		}
	} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();
		StringBuilder ans =new StringBuilder(S);
		if(S.charAt(K-1)=='A'){		
			ans.setCharAt((K-1), 'a');
		}
		if(S.charAt(K-1)=='B'){		
			ans.setCharAt((K-1), 'b');
		}
		if(S.charAt(K-1)=='C'){		
			ans.setCharAt((K-1), 'c');
		}

		System.out.println(ans);	
		} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();
		StringBuilder ans =new StringBuilder(S);
		if(S.charAt(K-1)=='A'){		
			ans.setCharAt((K-1), 'a');
		}
		if(S.charAt(K-1)=='B'){		
			ans.setCharAt((K-1), 'b');
		}
		if(S.charAt(K-1)=='C'){		
			ans.setCharAt((K-1), 'c');
		}

		System.out.println(ans);	
		} 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 String S = sc.next(); S sc.next() sc.next sc StringBuilder ans =new StringBuilder(S); ans new StringBuilder(S) if(S.charAt(K-1)=='A'){		
			ans.setCharAt((K-1), 'a');
		} S.charAt(K-1)=='A' S.charAt(K-1) S.charAt S K-1 K 1 'A' {		
			ans.setCharAt((K-1), 'a');
		} ans.setCharAt((K-1), 'a') ans.setCharAt ans (K-1) K 1 'a' if(S.charAt(K-1)=='B'){		
			ans.setCharAt((K-1), 'b');
		} S.charAt(K-1)=='B' S.charAt(K-1) S.charAt S K-1 K 1 'B' {		
			ans.setCharAt((K-1), 'b');
		} ans.setCharAt((K-1), 'b') ans.setCharAt ans (K-1) K 1 'b' if(S.charAt(K-1)=='C'){		
			ans.setCharAt((K-1), 'c');
		} S.charAt(K-1)=='C' S.charAt(K-1) S.charAt S K-1 K 1 'C' {		
			ans.setCharAt((K-1), 'c');
		} ans.setCharAt((K-1), 'c') ans.setCharAt ans (K-1) K 1 'c' System.out.println(ans) System.out.println System.out System System.out ans 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();
		String S = sc.next();
		StringBuilder ans =new StringBuilder(S);
		if(S.charAt(K-1)=='A'){		
			ans.setCharAt((K-1), 'a');
		}
		if(S.charAt(K-1)=='B'){		
			ans.setCharAt((K-1), 'b');
		}
		if(S.charAt(K-1)=='C'){		
			ans.setCharAt((K-1), 'c');
		}

		System.out.println(ans);	
		}
	} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();
		StringBuilder ans =new StringBuilder(S);
		if(S.charAt(K-1)=='A'){		
			ans.setCharAt((K-1), 'a');
		}
		if(S.charAt(K-1)=='B'){		
			ans.setCharAt((K-1), 'b');
		}
		if(S.charAt(K-1)=='C'){		
			ans.setCharAt((K-1), 'c');
		}

		System.out.println(ans);	
		}
	} Main
import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();
		StringBuilder ans =new StringBuilder(S);
		if(S.charAt(K-1)=='A'){		
			ans.setCharAt((K-1), 'a');
		}
		if(S.charAt(K-1)=='B'){		
			ans.setCharAt((K-1), 'b');
		}
		if(S.charAt(K-1)=='C'){		
			ans.setCharAt((K-1), 'c');
		}

		System.out.println(ans);	
		}
	}
