
import java.util.*;

public class Main {
	public static void main(String[] args) {
		Main main = new Main();
		main.run();
	}

	public void run() {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		k--;
		StringBuilder sb = new StringBuilder(sc.next());
		char c = sb.charAt(k);
		if(c=='A') sb.setCharAt(k, 'a');
		if(c=='B') sb.setCharAt(k, 'b');
		if(c=='C') sb.setCharAt(k, 'c');
		System.out.println(sb.toString());
		sc.close();
	}

} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Main main = new Main();
		main.run();
	}

	public void run() {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		k--;
		StringBuilder sb = new StringBuilder(sc.next());
		char c = sb.charAt(k);
		if(c=='A') sb.setCharAt(k, 'a');
		if(c=='B') sb.setCharAt(k, 'b');
		if(c=='C') sb.setCharAt(k, 'c');
		System.out.println(sb.toString());
		sc.close();
	}

} Main public static void main(String[] args) {
		Main main = new Main();
		main.run();
	} main {
		Main main = new Main();
		main.run();
	} Main main = new Main(); main new Main() main.run() main.run main String[] args args public void run() {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		k--;
		StringBuilder sb = new StringBuilder(sc.next());
		char c = sb.charAt(k);
		if(c=='A') sb.setCharAt(k, 'a');
		if(c=='B') sb.setCharAt(k, 'b');
		if(c=='C') sb.setCharAt(k, 'c');
		System.out.println(sb.toString());
		sc.close();
	} run {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		k--;
		StringBuilder sb = new StringBuilder(sc.next());
		char c = sb.charAt(k);
		if(c=='A') sb.setCharAt(k, 'a');
		if(c=='B') sb.setCharAt(k, 'b');
		if(c=='C') sb.setCharAt(k, 'c');
		System.out.println(sb.toString());
		sc.close();
	} 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 k-- k StringBuilder sb = new StringBuilder(sc.next()); sb new StringBuilder(sc.next()) char c = sb.charAt(k); c sb.charAt(k) sb.charAt sb k if(c=='A') sb.setCharAt(k, 'a'); c=='A' c 'A' sb.setCharAt(k, 'a') sb.setCharAt sb k 'a' if(c=='B') sb.setCharAt(k, 'b'); c=='B' c 'B' sb.setCharAt(k, 'b') sb.setCharAt sb k 'b' if(c=='C') sb.setCharAt(k, 'c'); c=='C' c 'C' sb.setCharAt(k, 'c') sb.setCharAt sb k 'c' System.out.println(sb.toString()) System.out.println System.out System System.out sb.toString() sb.toString sb sc.close() sc.close sc public class Main {
	public static void main(String[] args) {
		Main main = new Main();
		main.run();
	}

	public void run() {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		k--;
		StringBuilder sb = new StringBuilder(sc.next());
		char c = sb.charAt(k);
		if(c=='A') sb.setCharAt(k, 'a');
		if(c=='B') sb.setCharAt(k, 'b');
		if(c=='C') sb.setCharAt(k, 'c');
		System.out.println(sb.toString());
		sc.close();
	}

} public class Main {
	public static void main(String[] args) {
		Main main = new Main();
		main.run();
	}

	public void run() {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		k--;
		StringBuilder sb = new StringBuilder(sc.next());
		char c = sb.charAt(k);
		if(c=='A') sb.setCharAt(k, 'a');
		if(c=='B') sb.setCharAt(k, 'b');
		if(c=='C') sb.setCharAt(k, 'c');
		System.out.println(sb.toString());
		sc.close();
	}

} Main

import java.util.*;

public class Main {
	public static void main(String[] args) {
		Main main = new Main();
		main.run();
	}

	public void run() {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		k--;
		StringBuilder sb = new StringBuilder(sc.next());
		char c = sb.charAt(k);
		if(c=='A') sb.setCharAt(k, 'a');
		if(c=='B') sb.setCharAt(k, 'b');
		if(c=='C') sb.setCharAt(k, 'c');
		System.out.println(sb.toString());
		sc.close();
	}

}
