import java.util.Scanner;

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();

		String a = S.substring(0, K-1);
		String b = S.substring(K-1, K).toLowerCase();
		String c = S.substring(K);
		System.out.println(a + b + c);
	}
} import java.util.Scanner; Scanner 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();

		String a = S.substring(0, K-1);
		String b = S.substring(K-1, K).toLowerCase();
		String c = S.substring(K);
		System.out.println(a + b + c);
	}
} 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();

		String a = S.substring(0, K-1);
		String b = S.substring(K-1, K).toLowerCase();
		String c = S.substring(K);
		System.out.println(a + b + c);
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();

		String a = S.substring(0, K-1);
		String b = S.substring(K-1, K).toLowerCase();
		String c = S.substring(K);
		System.out.println(a + b + c);
	} 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 String a = S.substring(0, K-1); a S.substring(0, K-1) S.substring S 0 K-1 K 1 String b = S.substring(K-1, K).toLowerCase(); b 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 String c = S.substring(K); c S.substring(K) S.substring S K System.out.println(a + b + c) System.out.println System.out System System.out a + b + c a + b + c a b c 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();

		String a = S.substring(0, K-1);
		String b = S.substring(K-1, K).toLowerCase();
		String c = S.substring(K);
		System.out.println(a + b + c);
	}
} 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();

		String a = S.substring(0, K-1);
		String b = S.substring(K-1, K).toLowerCase();
		String c = S.substring(K);
		System.out.println(a + b + c);
	}
} Main
import java.util.Scanner;

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();

		String a = S.substring(0, K-1);
		String b = S.substring(K-1, K).toLowerCase();
		String c = S.substring(K);
		System.out.println(a + b + c);
	}
}