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();

		String[] str = new String[N];

		for(int i=0; i<N; i++) {

			if(i==K-1) {
				if( String.valueOf(S.charAt(i)) .equals( "A")) str[i] = "a";
				else if( String.valueOf(S.charAt(i)).equals( "B"))  str[i] =  "b";
				else if( String.valueOf(S.charAt(i)) .equals( "C"))  str[i] =  "c";
			}
			else {
			str[i] = String.valueOf(S.charAt(i));

			}

		}
		for(int i=0; i<N; i++) {


		System.out.print(str[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();

		String[] str = new String[N];

		for(int i=0; i<N; i++) {

			if(i==K-1) {
				if( String.valueOf(S.charAt(i)) .equals( "A")) str[i] = "a";
				else if( String.valueOf(S.charAt(i)).equals( "B"))  str[i] =  "b";
				else if( String.valueOf(S.charAt(i)) .equals( "C"))  str[i] =  "c";
			}
			else {
			str[i] = String.valueOf(S.charAt(i));

			}

		}
		for(int i=0; i<N; i++) {


		System.out.print(str[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();

		String[] str = new String[N];

		for(int i=0; i<N; i++) {

			if(i==K-1) {
				if( String.valueOf(S.charAt(i)) .equals( "A")) str[i] = "a";
				else if( String.valueOf(S.charAt(i)).equals( "B"))  str[i] =  "b";
				else if( String.valueOf(S.charAt(i)) .equals( "C"))  str[i] =  "c";
			}
			else {
			str[i] = String.valueOf(S.charAt(i));

			}

		}
		for(int i=0; i<N; i++) {


		System.out.print(str[i]);
		}
	} main {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();

		int K = sc.nextInt();

		String S = sc.next();

		String[] str = new String[N];

		for(int i=0; i<N; i++) {

			if(i==K-1) {
				if( String.valueOf(S.charAt(i)) .equals( "A")) str[i] = "a";
				else if( String.valueOf(S.charAt(i)).equals( "B"))  str[i] =  "b";
				else if( String.valueOf(S.charAt(i)) .equals( "C"))  str[i] =  "c";
			}
			else {
			str[i] = String.valueOf(S.charAt(i));

			}

		}
		for(int i=0; i<N; i++) {


		System.out.print(str[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 String[] str = new String[N]; str new String[N] N for(int i=0; i<N; i++) {

			if(i==K-1) {
				if( String.valueOf(S.charAt(i)) .equals( "A")) str[i] = "a";
				else if( String.valueOf(S.charAt(i)).equals( "B"))  str[i] =  "b";
				else if( String.valueOf(S.charAt(i)) .equals( "C"))  str[i] =  "c";
			}
			else {
			str[i] = String.valueOf(S.charAt(i));

			}

		} int i=0; int i=0; i 0 i<N i N i++ i++ i {

			if(i==K-1) {
				if( String.valueOf(S.charAt(i)) .equals( "A")) str[i] = "a";
				else if( String.valueOf(S.charAt(i)).equals( "B"))  str[i] =  "b";
				else if( String.valueOf(S.charAt(i)) .equals( "C"))  str[i] =  "c";
			}
			else {
			str[i] = String.valueOf(S.charAt(i));

			}

		} {

			if(i==K-1) {
				if( String.valueOf(S.charAt(i)) .equals( "A")) str[i] = "a";
				else if( String.valueOf(S.charAt(i)).equals( "B"))  str[i] =  "b";
				else if( String.valueOf(S.charAt(i)) .equals( "C"))  str[i] =  "c";
			}
			else {
			str[i] = String.valueOf(S.charAt(i));

			}

		} if(i==K-1) {
				if( String.valueOf(S.charAt(i)) .equals( "A")) str[i] = "a";
				else if( String.valueOf(S.charAt(i)).equals( "B"))  str[i] =  "b";
				else if( String.valueOf(S.charAt(i)) .equals( "C"))  str[i] =  "c";
			}
			else {
			str[i] = String.valueOf(S.charAt(i));

			} i==K-1 i K-1 K 1 {
				if( String.valueOf(S.charAt(i)) .equals( "A")) str[i] = "a";
				else if( String.valueOf(S.charAt(i)).equals( "B"))  str[i] =  "b";
				else if( String.valueOf(S.charAt(i)) .equals( "C"))  str[i] =  "c";
			} if( String.valueOf(S.charAt(i)) .equals( "A")) str[i] = "a";
				else if( String.valueOf(S.charAt(i)).equals( "B"))  str[i] =  "b";
				else if( String.valueOf(S.charAt(i)) .equals( "C"))  str[i] =  "c"; String.valueOf(S.charAt(i)) .equals( "A") String.valueOf(S.charAt(i)) .equals String.valueOf(S.charAt(i)) String.valueOf String S.charAt(i) S.charAt S i "A" str[i] = "a" str[i] str i "a" if( String.valueOf(S.charAt(i)).equals( "B"))  str[i] =  "b";
				else if( String.valueOf(S.charAt(i)) .equals( "C"))  str[i] =  "c"; String.valueOf(S.charAt(i)).equals( "B") String.valueOf(S.charAt(i)).equals String.valueOf(S.charAt(i)) String.valueOf String S.charAt(i) S.charAt S i "B" str[i] =  "b" str[i] str i "b" if( String.valueOf(S.charAt(i)) .equals( "C"))  str[i] =  "c"; String.valueOf(S.charAt(i)) .equals( "C") String.valueOf(S.charAt(i)) .equals String.valueOf(S.charAt(i)) String.valueOf String S.charAt(i) S.charAt S i "C" str[i] =  "c" str[i] str i "c" {
			str[i] = String.valueOf(S.charAt(i));

			} str[i] = String.valueOf(S.charAt(i)) str[i] str i String.valueOf(S.charAt(i)) String.valueOf String S.charAt(i) S.charAt S i for(int i=0; i<N; i++) {


		System.out.print(str[i]);
		} int i=0; int i=0; i 0 i<N i N i++ i++ i {


		System.out.print(str[i]);
		} {


		System.out.print(str[i]);
		} System.out.print(str[i]) System.out.print System.out System System.out str[i] str 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();

		String[] str = new String[N];

		for(int i=0; i<N; i++) {

			if(i==K-1) {
				if( String.valueOf(S.charAt(i)) .equals( "A")) str[i] = "a";
				else if( String.valueOf(S.charAt(i)).equals( "B"))  str[i] =  "b";
				else if( String.valueOf(S.charAt(i)) .equals( "C"))  str[i] =  "c";
			}
			else {
			str[i] = String.valueOf(S.charAt(i));

			}

		}
		for(int i=0; i<N; i++) {


		System.out.print(str[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();

		String[] str = new String[N];

		for(int i=0; i<N; i++) {

			if(i==K-1) {
				if( String.valueOf(S.charAt(i)) .equals( "A")) str[i] = "a";
				else if( String.valueOf(S.charAt(i)).equals( "B"))  str[i] =  "b";
				else if( String.valueOf(S.charAt(i)) .equals( "C"))  str[i] =  "c";
			}
			else {
			str[i] = String.valueOf(S.charAt(i));

			}

		}
		for(int i=0; i<N; i++) {


		System.out.print(str[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();

		String[] str = new String[N];

		for(int i=0; i<N; i++) {

			if(i==K-1) {
				if( String.valueOf(S.charAt(i)) .equals( "A")) str[i] = "a";
				else if( String.valueOf(S.charAt(i)).equals( "B"))  str[i] =  "b";
				else if( String.valueOf(S.charAt(i)) .equals( "C"))  str[i] =  "c";
			}
			else {
			str[i] = String.valueOf(S.charAt(i));

			}

		}
		for(int i=0; i<N; i++) {


		System.out.print(str[i]);
		}
	}

}
