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();
		String[] sArray = S.split("");
		sArray[K - 1] = sArray[K - 1].toLowerCase();
		System.out.println(String.join("", 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();
		String[] sArray = S.split("");
		sArray[K - 1] = sArray[K - 1].toLowerCase();
		System.out.println(String.join("", 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();
		String[] sArray = S.split("");
		sArray[K - 1] = sArray[K - 1].toLowerCase();
		System.out.println(String.join("", sArray));
		scanner.close();
	} main {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int K = scanner.nextInt();
		String S = scanner.next();
		String[] sArray = S.split("");
		sArray[K - 1] = sArray[K - 1].toLowerCase();
		System.out.println(String.join("", 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 String[] sArray = S.split(""); sArray S.split("") S.split S "" sArray[K - 1] = sArray[K - 1].toLowerCase() sArray[K - 1] sArray K - 1 K 1 sArray[K - 1].toLowerCase() sArray[K - 1].toLowerCase sArray[K - 1] sArray K - 1 K 1 System.out.println(String.join("", sArray)) System.out.println System.out System System.out String.join("", sArray) String.join String "" 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();
		String[] sArray = S.split("");
		sArray[K - 1] = sArray[K - 1].toLowerCase();
		System.out.println(String.join("", 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();
		String[] sArray = S.split("");
		sArray[K - 1] = sArray[K - 1].toLowerCase();
		System.out.println(String.join("", 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();
		String[] sArray = S.split("");
		sArray[K - 1] = sArray[K - 1].toLowerCase();
		System.out.println(String.join("", sArray));
		scanner.close();
	}
}