import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner $ = new Scanner(System.in);
		int N = $.nextInt(), K = $.nextInt();
		String S = $.next();
		System.out.print(S.substring(0, K - 1));
		if (S.substring(K - 1, K).equals("A")) System.out.print("a");
		else if (S.substring(K - 1, K).equals("B")) System.out.print("b");
		else System.out.print("c");
		System.out.println(S.substring(K, N));
		/*
		3 1 ABC -> aBC
		4 3 CABA -> CAbA
		*/
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) throws Exception {
		Scanner $ = new Scanner(System.in);
		int N = $.nextInt(), K = $.nextInt();
		String S = $.next();
		System.out.print(S.substring(0, K - 1));
		if (S.substring(K - 1, K).equals("A")) System.out.print("a");
		else if (S.substring(K - 1, K).equals("B")) System.out.print("b");
		else System.out.print("c");
		System.out.println(S.substring(K, N));
		/*
		3 1 ABC -> aBC
		4 3 CABA -> CAbA
		*/
	}
} Main public static void main(String[] args) throws Exception {
		Scanner $ = new Scanner(System.in);
		int N = $.nextInt(), K = $.nextInt();
		String S = $.next();
		System.out.print(S.substring(0, K - 1));
		if (S.substring(K - 1, K).equals("A")) System.out.print("a");
		else if (S.substring(K - 1, K).equals("B")) System.out.print("b");
		else System.out.print("c");
		System.out.println(S.substring(K, N));
		/*
		3 1 ABC -> aBC
		4 3 CABA -> CAbA
		*/
	} main {
		Scanner $ = new Scanner(System.in);
		int N = $.nextInt(), K = $.nextInt();
		String S = $.next();
		System.out.print(S.substring(0, K - 1));
		if (S.substring(K - 1, K).equals("A")) System.out.print("a");
		else if (S.substring(K - 1, K).equals("B")) System.out.print("b");
		else System.out.print("c");
		System.out.println(S.substring(K, N));
		/*
		3 1 ABC -> aBC
		4 3 CABA -> CAbA
		*/
	} Scanner $ = new Scanner(System.in); $ new Scanner(System.in) int N = $.nextInt() N $.nextInt() $.nextInt $ K = $.nextInt(); K $.nextInt() $.nextInt $ String S = $.next(); S $.next() $.next $ System.out.print(S.substring(0, K - 1)) System.out.print System.out System System.out S.substring(0, K - 1) S.substring S 0 K - 1 K 1 if (S.substring(K - 1, K).equals("A")) System.out.print("a");
		else if (S.substring(K - 1, K).equals("B")) System.out.print("b");
		else System.out.print("c"); S.substring(K - 1, K).equals("A") S.substring(K - 1, K).equals S.substring(K - 1, K) S.substring S K - 1 K 1 K "A" System.out.print("a") System.out.print System.out System System.out "a" if (S.substring(K - 1, K).equals("B")) System.out.print("b");
		else System.out.print("c"); S.substring(K - 1, K).equals("B") S.substring(K - 1, K).equals S.substring(K - 1, K) S.substring S K - 1 K 1 K "B" System.out.print("b") System.out.print System.out System System.out "b" System.out.print("c") System.out.print System.out System System.out "c" System.out.println(S.substring(K, N)) System.out.println System.out System System.out S.substring(K, N) S.substring S K N String[] args args public class Main {
	public static void main(String[] args) throws Exception {
		Scanner $ = new Scanner(System.in);
		int N = $.nextInt(), K = $.nextInt();
		String S = $.next();
		System.out.print(S.substring(0, K - 1));
		if (S.substring(K - 1, K).equals("A")) System.out.print("a");
		else if (S.substring(K - 1, K).equals("B")) System.out.print("b");
		else System.out.print("c");
		System.out.println(S.substring(K, N));
		/*
		3 1 ABC -> aBC
		4 3 CABA -> CAbA
		*/
	}
} public class Main {
	public static void main(String[] args) throws Exception {
		Scanner $ = new Scanner(System.in);
		int N = $.nextInt(), K = $.nextInt();
		String S = $.next();
		System.out.print(S.substring(0, K - 1));
		if (S.substring(K - 1, K).equals("A")) System.out.print("a");
		else if (S.substring(K - 1, K).equals("B")) System.out.print("b");
		else System.out.print("c");
		System.out.println(S.substring(K, N));
		/*
		3 1 ABC -> aBC
		4 3 CABA -> CAbA
		*/
	}
} Main
import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner $ = new Scanner(System.in);
		int N = $.nextInt(), K = $.nextInt();
		String S = $.next();
		System.out.print(S.substring(0, K - 1));
		if (S.substring(K - 1, K).equals("A")) System.out.print("a");
		else if (S.substring(K - 1, K).equals("B")) System.out.print("b");
		else System.out.print("c");
		System.out.println(S.substring(K, N));
		/*
		3 1 ABC -> aBC
		4 3 CABA -> CAbA
		*/
	}
}
