import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int K = scanner.nextInt();
		String S = scanner.next();
		char[] sArray = S.toCharArray();
		sArray[K - 1] += 32;
		System.out.println(sArray);
		scanner.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int K = scanner.nextInt();
		String S = scanner.next();
		char[] sArray = S.toCharArray();
		sArray[K - 1] += 32;
		System.out.println(sArray);
		scanner.close();
	}
} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int K = scanner.nextInt();
		String S = scanner.next();
		char[] sArray = S.toCharArray();
		sArray[K - 1] += 32;
		System.out.println(sArray);
		scanner.close();
	} main {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int K = scanner.nextInt();
		String S = scanner.next();
		char[] sArray = S.toCharArray();
		sArray[K - 1] += 32;
		System.out.println(sArray);
		scanner.close();
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner int K = scanner.nextInt(); K scanner.nextInt() scanner.nextInt scanner String S = scanner.next(); S scanner.next() scanner.next scanner char[] sArray = S.toCharArray(); sArray S.toCharArray() S.toCharArray S sArray[K - 1] += 32 sArray[K - 1] sArray K - 1 K 1 32 System.out.println(sArray) System.out.println System.out System System.out sArray scanner.close() scanner.close scanner String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int K = scanner.nextInt();
		String S = scanner.next();
		char[] sArray = S.toCharArray();
		sArray[K - 1] += 32;
		System.out.println(sArray);
		scanner.close();
	}
} public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int K = scanner.nextInt();
		String S = scanner.next();
		char[] sArray = S.toCharArray();
		sArray[K - 1] += 32;
		System.out.println(sArray);
		scanner.close();
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int K = scanner.nextInt();
		String S = scanner.next();
		char[] sArray = S.toCharArray();
		sArray[K - 1] += 32;
		System.out.println(sArray);
		scanner.close();
	}
}