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();
		sc.close();
		System.out.println(S.substring(0,K-1) + String.valueOf(S.charAt(K-1)).toLowerCase()+ S.substring(K));
	}

} 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();
		sc.close();
		System.out.println(S.substring(0,K-1) + String.valueOf(S.charAt(K-1)).toLowerCase()+ S.substring(K));
	}

} 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();
		sc.close();
		System.out.println(S.substring(0,K-1) + String.valueOf(S.charAt(K-1)).toLowerCase()+ S.substring(K));
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();
		sc.close();
		System.out.println(S.substring(0,K-1) + String.valueOf(S.charAt(K-1)).toLowerCase()+ S.substring(K));
	} 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 sc.close() sc.close sc System.out.println(S.substring(0,K-1) + String.valueOf(S.charAt(K-1)).toLowerCase()+ S.substring(K)) System.out.println System.out System System.out S.substring(0,K-1) + String.valueOf(S.charAt(K-1)).toLowerCase()+ S.substring(K) S.substring(0,K-1) + String.valueOf(S.charAt(K-1)).toLowerCase()+ S.substring(K) S.substring(0,K-1) S.substring S 0 K-1 K 1 String.valueOf(S.charAt(K-1)).toLowerCase() String.valueOf(S.charAt(K-1)).toLowerCase String.valueOf(S.charAt(K-1)) String.valueOf String S.charAt(K-1) S.charAt S K-1 K 1 S.substring(K) S.substring S K 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();
		sc.close();
		System.out.println(S.substring(0,K-1) + String.valueOf(S.charAt(K-1)).toLowerCase()+ S.substring(K));
	}

} 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();
		sc.close();
		System.out.println(S.substring(0,K-1) + String.valueOf(S.charAt(K-1)).toLowerCase()+ S.substring(K));
	}

} 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();
		sc.close();
		System.out.println(S.substring(0,K-1) + String.valueOf(S.charAt(K-1)).toLowerCase()+ S.substring(K));
	}

}
