import java.util.Scanner;

public class Main {

	public static void main(final String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		char[] S = sc.next().toCharArray();
		sc.close();
		S[K - 1] = (char)(S[K - 1] + 32);
		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(final String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		char[] S = sc.next().toCharArray();
		sc.close();
		S[K - 1] = (char)(S[K - 1] + 32);
		for(int i = 0; i < N; i++) {
			System.out.print(S[i]);
		}
	}
} Main public static void main(final String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		char[] S = sc.next().toCharArray();
		sc.close();
		S[K - 1] = (char)(S[K - 1] + 32);
		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();
		sc.close();
		S[K - 1] = (char)(S[K - 1] + 32);
		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 sc.close() sc.close sc S[K - 1] = (char)(S[K - 1] + 32) S[K - 1] S K - 1 K 1 (char)(S[K - 1] + 32) S[K - 1] S K - 1 K 1 32 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 final String[] args args public class Main {

	public static void main(final String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		char[] S = sc.next().toCharArray();
		sc.close();
		S[K - 1] = (char)(S[K - 1] + 32);
		for(int i = 0; i < N; i++) {
			System.out.print(S[i]);
		}
	}
} public class Main {

	public static void main(final String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		char[] S = sc.next().toCharArray();
		sc.close();
		S[K - 1] = (char)(S[K - 1] + 32);
		for(int i = 0; i < N; i++) {
			System.out.print(S[i]);
		}
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(final String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		char[] S = sc.next().toCharArray();
		sc.close();
		S[K - 1] = (char)(S[K - 1] + 32);
		for(int i = 0; i < N; i++) {
			System.out.print(S[i]);
		}
	}
}