import java.util.*;
public class Main {

	public static void main(String[] args) {
		Scanner seer = new Scanner(System.in);
		int n = seer.nextInt();
		int k = seer.nextInt();
		char[] s = seer.next().toCharArray();
		s[k-1] -= ('A'-'a');
		System.out.println(new String(s));
	}

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

	public static void main(String[] args) {
		Scanner seer = new Scanner(System.in);
		int n = seer.nextInt();
		int k = seer.nextInt();
		char[] s = seer.next().toCharArray();
		s[k-1] -= ('A'-'a');
		System.out.println(new String(s));
	}

} Main public static void main(String[] args) {
		Scanner seer = new Scanner(System.in);
		int n = seer.nextInt();
		int k = seer.nextInt();
		char[] s = seer.next().toCharArray();
		s[k-1] -= ('A'-'a');
		System.out.println(new String(s));
	} main {
		Scanner seer = new Scanner(System.in);
		int n = seer.nextInt();
		int k = seer.nextInt();
		char[] s = seer.next().toCharArray();
		s[k-1] -= ('A'-'a');
		System.out.println(new String(s));
	} Scanner seer = new Scanner(System.in); seer new Scanner(System.in) int n = seer.nextInt(); n seer.nextInt() seer.nextInt seer int k = seer.nextInt(); k seer.nextInt() seer.nextInt seer char[] s = seer.next().toCharArray(); s seer.next().toCharArray() seer.next().toCharArray seer.next() seer.next seer s[k-1] -= ('A'-'a') s[k-1] s k-1 k 1 ('A'-'a') 'A' 'a' System.out.println(new String(s)) System.out.println System.out System System.out new String(s) String[] args args public class Main {

	public static void main(String[] args) {
		Scanner seer = new Scanner(System.in);
		int n = seer.nextInt();
		int k = seer.nextInt();
		char[] s = seer.next().toCharArray();
		s[k-1] -= ('A'-'a');
		System.out.println(new String(s));
	}

} public class Main {

	public static void main(String[] args) {
		Scanner seer = new Scanner(System.in);
		int n = seer.nextInt();
		int k = seer.nextInt();
		char[] s = seer.next().toCharArray();
		s[k-1] -= ('A'-'a');
		System.out.println(new String(s));
	}

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

	public static void main(String[] args) {
		Scanner seer = new Scanner(System.in);
		int n = seer.nextInt();
		int k = seer.nextInt();
		char[] s = seer.next().toCharArray();
		s[k-1] -= ('A'-'a');
		System.out.println(new String(s));
	}

}
