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();
		String s = sc.next();
		for (int i=0;i<N;i++) {
			if (i==K-1) {
				System.out.print((char)(s.charAt(i)-'A'+'a'));
			} else {
				System.out.print(s.charAt(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();
		String s = sc.next();
		for (int i=0;i<N;i++) {
			if (i==K-1) {
				System.out.print((char)(s.charAt(i)-'A'+'a'));
			} else {
				System.out.print(s.charAt(i));
			}
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		String s = sc.next();
		for (int i=0;i<N;i++) {
			if (i==K-1) {
				System.out.print((char)(s.charAt(i)-'A'+'a'));
			} else {
				System.out.print(s.charAt(i));
			}
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		String s = sc.next();
		for (int i=0;i<N;i++) {
			if (i==K-1) {
				System.out.print((char)(s.charAt(i)-'A'+'a'));
			} else {
				System.out.print(s.charAt(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 String s = sc.next(); s sc.next() sc.next sc for (int i=0;i<N;i++) {
			if (i==K-1) {
				System.out.print((char)(s.charAt(i)-'A'+'a'));
			} else {
				System.out.print(s.charAt(i));
			}
		} int i=0; int i=0; i 0 i<N i N i++ i++ i {
			if (i==K-1) {
				System.out.print((char)(s.charAt(i)-'A'+'a'));
			} else {
				System.out.print(s.charAt(i));
			}
		} {
			if (i==K-1) {
				System.out.print((char)(s.charAt(i)-'A'+'a'));
			} else {
				System.out.print(s.charAt(i));
			}
		} if (i==K-1) {
				System.out.print((char)(s.charAt(i)-'A'+'a'));
			} else {
				System.out.print(s.charAt(i));
			} i==K-1 i K-1 K 1 {
				System.out.print((char)(s.charAt(i)-'A'+'a'));
			} System.out.print((char)(s.charAt(i)-'A'+'a')) System.out.print System.out System System.out (char)(s.charAt(i)-'A'+'a') s.charAt(i)-'A' s.charAt(i) s.charAt s i 'A' 'a' {
				System.out.print(s.charAt(i));
			} System.out.print(s.charAt(i)) System.out.print System.out System System.out s.charAt(i) s.charAt 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();
		String s = sc.next();
		for (int i=0;i<N;i++) {
			if (i==K-1) {
				System.out.print((char)(s.charAt(i)-'A'+'a'));
			} else {
				System.out.print(s.charAt(i));
			}
		}
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		String s = sc.next();
		for (int i=0;i<N;i++) {
			if (i==K-1) {
				System.out.print((char)(s.charAt(i)-'A'+'a'));
			} else {
				System.out.print(s.charAt(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();
		String s = sc.next();
		for (int i=0;i<N;i++) {
			if (i==K-1) {
				System.out.print((char)(s.charAt(i)-'A'+'a'));
			} else {
				System.out.print(s.charAt(i));
			}
		}
	}
}
