import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		int K = stdIn.nextInt();
		String S = stdIn.next();
		String[] words = S.split("", 0);
		if(words[K-1].equals("A")) {
			words[K-1] = "a";
		}
		else if(words[K-1].equals("B")) {
			words[K-1] = "b";
		}
		else if(words[K-1].equals("C")) {
			words[K-1] = "c";
		}
		for(int i = 0; i < N; i++) {
			System.out.print(words[i]);
		}

	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		int K = stdIn.nextInt();
		String S = stdIn.next();
		String[] words = S.split("", 0);
		if(words[K-1].equals("A")) {
			words[K-1] = "a";
		}
		else if(words[K-1].equals("B")) {
			words[K-1] = "b";
		}
		else if(words[K-1].equals("C")) {
			words[K-1] = "c";
		}
		for(int i = 0; i < N; i++) {
			System.out.print(words[i]);
		}

	}

} Main public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		int K = stdIn.nextInt();
		String S = stdIn.next();
		String[] words = S.split("", 0);
		if(words[K-1].equals("A")) {
			words[K-1] = "a";
		}
		else if(words[K-1].equals("B")) {
			words[K-1] = "b";
		}
		else if(words[K-1].equals("C")) {
			words[K-1] = "c";
		}
		for(int i = 0; i < N; i++) {
			System.out.print(words[i]);
		}

	} main {
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		int K = stdIn.nextInt();
		String S = stdIn.next();
		String[] words = S.split("", 0);
		if(words[K-1].equals("A")) {
			words[K-1] = "a";
		}
		else if(words[K-1].equals("B")) {
			words[K-1] = "b";
		}
		else if(words[K-1].equals("C")) {
			words[K-1] = "c";
		}
		for(int i = 0; i < N; i++) {
			System.out.print(words[i]);
		}

	} Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) int N = stdIn.nextInt(); N stdIn.nextInt() stdIn.nextInt stdIn int K = stdIn.nextInt(); K stdIn.nextInt() stdIn.nextInt stdIn String S = stdIn.next(); S stdIn.next() stdIn.next stdIn String[] words = S.split("", 0); words S.split("", 0) S.split S "" 0 if(words[K-1].equals("A")) {
			words[K-1] = "a";
		}
		else if(words[K-1].equals("B")) {
			words[K-1] = "b";
		}
		else if(words[K-1].equals("C")) {
			words[K-1] = "c";
		} words[K-1].equals("A") words[K-1].equals words[K-1] words K-1 K 1 "A" {
			words[K-1] = "a";
		} words[K-1] = "a" words[K-1] words K-1 K 1 "a" if(words[K-1].equals("B")) {
			words[K-1] = "b";
		}
		else if(words[K-1].equals("C")) {
			words[K-1] = "c";
		} words[K-1].equals("B") words[K-1].equals words[K-1] words K-1 K 1 "B" {
			words[K-1] = "b";
		} words[K-1] = "b" words[K-1] words K-1 K 1 "b" if(words[K-1].equals("C")) {
			words[K-1] = "c";
		} words[K-1].equals("C") words[K-1].equals words[K-1] words K-1 K 1 "C" {
			words[K-1] = "c";
		} words[K-1] = "c" words[K-1] words K-1 K 1 "c" for(int i = 0; i < N; i++) {
			System.out.print(words[i]);
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			System.out.print(words[i]);
		} {
			System.out.print(words[i]);
		} System.out.print(words[i]) System.out.print System.out System System.out words[i] words i String[] args args public class Main {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		int K = stdIn.nextInt();
		String S = stdIn.next();
		String[] words = S.split("", 0);
		if(words[K-1].equals("A")) {
			words[K-1] = "a";
		}
		else if(words[K-1].equals("B")) {
			words[K-1] = "b";
		}
		else if(words[K-1].equals("C")) {
			words[K-1] = "c";
		}
		for(int i = 0; i < N; i++) {
			System.out.print(words[i]);
		}

	}

} public class Main {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		int K = stdIn.nextInt();
		String S = stdIn.next();
		String[] words = S.split("", 0);
		if(words[K-1].equals("A")) {
			words[K-1] = "a";
		}
		else if(words[K-1].equals("B")) {
			words[K-1] = "b";
		}
		else if(words[K-1].equals("C")) {
			words[K-1] = "c";
		}
		for(int i = 0; i < N; i++) {
			System.out.print(words[i]);
		}

	}

} Main
import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		int K = stdIn.nextInt();
		String S = stdIn.next();
		String[] words = S.split("", 0);
		if(words[K-1].equals("A")) {
			words[K-1] = "a";
		}
		else if(words[K-1].equals("B")) {
			words[K-1] = "b";
		}
		else if(words[K-1].equals("C")) {
			words[K-1] = "c";
		}
		for(int i = 0; i < N; i++) {
			System.out.print(words[i]);
		}

	}

}