import java.util.*;

public class Main{
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		int a = scan.nextInt();
		int b = scan.nextInt();
		String c = scan.next();
		String ans;
		ans = c.substring(0,b-1)+c.substring(b-1,b).toLowerCase()+c.substring(b);
		System.out.println(ans);
	}
} import java.util.*; util.* java public class Main{
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		int a = scan.nextInt();
		int b = scan.nextInt();
		String c = scan.next();
		String ans;
		ans = c.substring(0,b-1)+c.substring(b-1,b).toLowerCase()+c.substring(b);
		System.out.println(ans);
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		int a = scan.nextInt();
		int b = scan.nextInt();
		String c = scan.next();
		String ans;
		ans = c.substring(0,b-1)+c.substring(b-1,b).toLowerCase()+c.substring(b);
		System.out.println(ans);
	} main {
		Scanner scan = new Scanner(System.in);

		int a = scan.nextInt();
		int b = scan.nextInt();
		String c = scan.next();
		String ans;
		ans = c.substring(0,b-1)+c.substring(b-1,b).toLowerCase()+c.substring(b);
		System.out.println(ans);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int a = scan.nextInt(); a scan.nextInt() scan.nextInt scan int b = scan.nextInt(); b scan.nextInt() scan.nextInt scan String c = scan.next(); c scan.next() scan.next scan String ans; ans ans = c.substring(0,b-1)+c.substring(b-1,b).toLowerCase()+c.substring(b) ans c.substring(0,b-1)+c.substring(b-1,b).toLowerCase()+c.substring(b) c.substring(0,b-1)+c.substring(b-1,b).toLowerCase()+c.substring(b) c.substring(0,b-1) c.substring c 0 b-1 b 1 c.substring(b-1,b).toLowerCase() c.substring(b-1,b).toLowerCase c.substring(b-1,b) c.substring c b-1 b 1 b c.substring(b) c.substring c b System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main{
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		int a = scan.nextInt();
		int b = scan.nextInt();
		String c = scan.next();
		String ans;
		ans = c.substring(0,b-1)+c.substring(b-1,b).toLowerCase()+c.substring(b);
		System.out.println(ans);
	}
} public class Main{
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		int a = scan.nextInt();
		int b = scan.nextInt();
		String c = scan.next();
		String ans;
		ans = c.substring(0,b-1)+c.substring(b-1,b).toLowerCase()+c.substring(b);
		System.out.println(ans);
	}
} Main
import java.util.*;

public class Main{
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		int a = scan.nextInt();
		int b = scan.nextInt();
		String c = scan.next();
		String ans;
		ans = c.substring(0,b-1)+c.substring(b-1,b).toLowerCase()+c.substring(b);
		System.out.println(ans);
	}
}