import java.util.*;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();
		System.out.println(S.substring(0,K-1)+Character.toLowerCase(S.charAt(K-1))+S.substring(K));
	}

} import java.util.*; util.* java public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();
		System.out.println(S.substring(0,K-1)+Character.toLowerCase(S.charAt(K-1))+S.substring(K));
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();
		System.out.println(S.substring(0,K-1)+Character.toLowerCase(S.charAt(K-1))+S.substring(K));
	} main {
		Scanner sc = new Scanner(System.in);
		sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();
		System.out.println(S.substring(0,K-1)+Character.toLowerCase(S.charAt(K-1))+S.substring(K));
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) 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 System.out.println(S.substring(0,K-1)+Character.toLowerCase(S.charAt(K-1))+S.substring(K)) System.out.println System.out System System.out S.substring(0,K-1)+Character.toLowerCase(S.charAt(K-1))+S.substring(K) S.substring(0,K-1)+Character.toLowerCase(S.charAt(K-1))+S.substring(K) S.substring(0,K-1) S.substring S 0 K-1 K 1 Character.toLowerCase(S.charAt(K-1)) Character.toLowerCase Character 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);
		sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();
		System.out.println(S.substring(0,K-1)+Character.toLowerCase(S.charAt(K-1))+S.substring(K));
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();
		System.out.println(S.substring(0,K-1)+Character.toLowerCase(S.charAt(K-1))+S.substring(K));
	}

} Main
import java.util.*;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();
		System.out.println(S.substring(0,K-1)+Character.toLowerCase(S.charAt(K-1))+S.substring(K));
	}

}
