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();
		char[] s = sc.next().toCharArray();
		s[k-1] = Character.toLowerCase(s[k-1]);
		for (int i = 0; i<n; i++) {
			System.out.print(s[i]);
		}
	}
} 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();
		char[] s = sc.next().toCharArray();
		s[k-1] = Character.toLowerCase(s[k-1]);
		for (int i = 0; i<n; i++) {
			System.out.print(s[i]);
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		char[] s = sc.next().toCharArray();
		s[k-1] = Character.toLowerCase(s[k-1]);
		for (int i = 0; i<n; i++) {
			System.out.print(s[i]);
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		char[] s = sc.next().toCharArray();
		s[k-1] = Character.toLowerCase(s[k-1]);
		for (int i = 0; i<n; i++) {
			System.out.print(s[i]);
		}
	} 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 char[] s = sc.next().toCharArray(); s sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc s[k-1] = Character.toLowerCase(s[k-1]) s[k-1] s k-1 k 1 Character.toLowerCase(s[k-1]) Character.toLowerCase Character s[k-1] s k-1 k 1 for (int i = 0; i<n; i++) {
			System.out.print(s[i]);
		} int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
			System.out.print(s[i]);
		} {
			System.out.print(s[i]);
		} System.out.print(s[i]) System.out.print System.out System System.out s[i] s i 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();
		char[] s = sc.next().toCharArray();
		s[k-1] = Character.toLowerCase(s[k-1]);
		for (int i = 0; i<n; i++) {
			System.out.print(s[i]);
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		char[] s = sc.next().toCharArray();
		s[k-1] = Character.toLowerCase(s[k-1]);
		for (int i = 0; i<n; i++) {
			System.out.print(s[i]);
		}
	}
} 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();
		char[] s = sc.next().toCharArray();
		s[k-1] = Character.toLowerCase(s[k-1]);
		for (int i = 0; i<n; i++) {
			System.out.print(s[i]);
		}
	}
}