import java.util.Scanner;
class Main{
	public static void main(String[]$){

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();

		S = S.substring(0,K-1) + S.substring(K-1,K).toLowerCase() + S.substring(K,S.length());

		System.out.println(S);
	}
} import java.util.Scanner; Scanner java.util class Main{
	public static void main(String[]$){

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();

		S = S.substring(0,K-1) + S.substring(K-1,K).toLowerCase() + S.substring(K,S.length());

		System.out.println(S);
	}
} Main public static void main(String[]$){

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();

		S = S.substring(0,K-1) + S.substring(K-1,K).toLowerCase() + S.substring(K,S.length());

		System.out.println(S);
	} main {

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();

		S = S.substring(0,K-1) + S.substring(K-1,K).toLowerCase() + S.substring(K,S.length());

		System.out.println(S);
	} 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 S = S.substring(0,K-1) + S.substring(K-1,K).toLowerCase() + S.substring(K,S.length()) S S.substring(0,K-1) + S.substring(K-1,K).toLowerCase() + S.substring(K,S.length()) S.substring(0,K-1) + S.substring(K-1,K).toLowerCase() + S.substring(K,S.length()) S.substring(0,K-1) S.substring S 0 K-1 K 1 S.substring(K-1,K).toLowerCase() S.substring(K-1,K).toLowerCase S.substring(K-1,K) S.substring S K-1 K 1 K S.substring(K,S.length()) S.substring S K S.length() S.length S System.out.println(S) System.out.println System.out System System.out S String[]$ $
import java.util.Scanner;
class Main{
	public static void main(String[]$){

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();

		S = S.substring(0,K-1) + S.substring(K-1,K).toLowerCase() + S.substring(K,S.length());

		System.out.println(S);
	}
}
