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 conv = Character.toLowerCase(s.charAt(k - 1));
		String pre = (k == 1 ? "" : s.substring(0, k - 1));
		String next = (k == n ? "" : s.substring(k));

		System.out.println(pre + conv + next);
	}
} 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 conv = Character.toLowerCase(s.charAt(k - 1));
		String pre = (k == 1 ? "" : s.substring(0, k - 1));
		String next = (k == n ? "" : s.substring(k));

		System.out.println(pre + conv + next);
	}
} 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 conv = Character.toLowerCase(s.charAt(k - 1));
		String pre = (k == 1 ? "" : s.substring(0, k - 1));
		String next = (k == n ? "" : s.substring(k));

		System.out.println(pre + conv + next);
	} main {
		Scanner scanner = new Scanner(System.in);

		int n = scanner.nextInt();
		int k = scanner.nextInt();
		String s = scanner.next();

		char conv = Character.toLowerCase(s.charAt(k - 1));
		String pre = (k == 1 ? "" : s.substring(0, k - 1));
		String next = (k == n ? "" : s.substring(k));

		System.out.println(pre + conv + next);
	} 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 conv = Character.toLowerCase(s.charAt(k - 1)); conv Character.toLowerCase(s.charAt(k - 1)) Character.toLowerCase Character s.charAt(k - 1) s.charAt s k - 1 k 1 String pre = (k == 1 ? "" : s.substring(0, k - 1)); pre (k == 1 ? "" : s.substring(0, k - 1)) k == 1 k 1 "" s.substring(0, k - 1) s.substring s 0 k - 1 k 1 String next = (k == n ? "" : s.substring(k)); next (k == n ? "" : s.substring(k)) k == n k n "" s.substring(k) s.substring s k System.out.println(pre + conv + next) System.out.println System.out System System.out pre + conv + next pre + conv + next pre conv next 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 conv = Character.toLowerCase(s.charAt(k - 1));
		String pre = (k == 1 ? "" : s.substring(0, k - 1));
		String next = (k == n ? "" : s.substring(k));

		System.out.println(pre + conv + next);
	}
} 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 conv = Character.toLowerCase(s.charAt(k - 1));
		String pre = (k == 1 ? "" : s.substring(0, k - 1));
		String next = (k == n ? "" : s.substring(k));

		System.out.println(pre + conv + next);
	}
} 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 conv = Character.toLowerCase(s.charAt(k - 1));
		String pre = (k == 1 ? "" : s.substring(0, k - 1));
		String next = (k == n ? "" : s.substring(k));

		System.out.println(pre + conv + next);
	}
}