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();
		
		int J = K -1;
		String str = S.substring(J,J + 1);
		String str2 = str.toLowerCase();
		
		int num = S.length();
		
		System.out.print(S.substring(0,J));
		System.out.print(str2);
		System.out.println(S.substring(K,N));
		
		
	}
} 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();
		
		int J = K -1;
		String str = S.substring(J,J + 1);
		String str2 = str.toLowerCase();
		
		int num = S.length();
		
		System.out.print(S.substring(0,J));
		System.out.print(str2);
		System.out.println(S.substring(K,N));
		
		
	}
} 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();
		
		int J = K -1;
		String str = S.substring(J,J + 1);
		String str2 = str.toLowerCase();
		
		int num = S.length();
		
		System.out.print(S.substring(0,J));
		System.out.print(str2);
		System.out.println(S.substring(K,N));
		
		
	} main {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();
		
		int J = K -1;
		String str = S.substring(J,J + 1);
		String str2 = str.toLowerCase();
		
		int num = S.length();
		
		System.out.print(S.substring(0,J));
		System.out.print(str2);
		System.out.println(S.substring(K,N));
		
		
	} 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 int J = K -1; J K -1 K 1 String str = S.substring(J,J + 1); str S.substring(J,J + 1) S.substring S J J + 1 J 1 String str2 = str.toLowerCase(); str2 str.toLowerCase() str.toLowerCase str int num = S.length(); num S.length() S.length S System.out.print(S.substring(0,J)) System.out.print System.out System System.out S.substring(0,J) S.substring S 0 J System.out.print(str2) System.out.print System.out System System.out str2 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) {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();
		
		int J = K -1;
		String str = S.substring(J,J + 1);
		String str2 = str.toLowerCase();
		
		int num = S.length();
		
		System.out.print(S.substring(0,J));
		System.out.print(str2);
		System.out.println(S.substring(K,N));
		
		
	}
} 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();
		
		int J = K -1;
		String str = S.substring(J,J + 1);
		String str2 = str.toLowerCase();
		
		int num = S.length();
		
		System.out.print(S.substring(0,J));
		System.out.print(str2);
		System.out.println(S.substring(K,N));
		
		
	}
} 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();
		
		int J = K -1;
		String str = S.substring(J,J + 1);
		String str2 = str.toLowerCase();
		
		int num = S.length();
		
		System.out.print(S.substring(0,J));
		System.out.print(str2);
		System.out.println(S.substring(K,N));
		
		
	}
}