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();
		char[] after = s.toCharArray();
		after[k - 1] = s.toLowerCase().toCharArray()[k - 1];
		System.out.println(String.valueOf(after));
	}
} 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();
		char[] after = s.toCharArray();
		after[k - 1] = s.toLowerCase().toCharArray()[k - 1];
		System.out.println(String.valueOf(after));
	}
} 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();
		char[] after = s.toCharArray();
		after[k - 1] = s.toLowerCase().toCharArray()[k - 1];
		System.out.println(String.valueOf(after));
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		String s = sc.next();
		char[] after = s.toCharArray();
		after[k - 1] = s.toLowerCase().toCharArray()[k - 1];
		System.out.println(String.valueOf(after));
	} 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 char[] after = s.toCharArray(); after s.toCharArray() s.toCharArray s after[k - 1] = s.toLowerCase().toCharArray()[k - 1] after[k - 1] after k - 1 k 1 s.toLowerCase().toCharArray()[k - 1] s.toLowerCase().toCharArray() s.toLowerCase().toCharArray s.toLowerCase() s.toLowerCase s k - 1 k 1 System.out.println(String.valueOf(after)) System.out.println System.out System System.out String.valueOf(after) String.valueOf String after 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();
		char[] after = s.toCharArray();
		after[k - 1] = s.toLowerCase().toCharArray()[k - 1];
		System.out.println(String.valueOf(after));
	}
} 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();
		char[] after = s.toCharArray();
		after[k - 1] = s.toLowerCase().toCharArray()[k - 1];
		System.out.println(String.valueOf(after));
	}
} 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();
		char[] after = s.toCharArray();
		after[k - 1] = s.toLowerCase().toCharArray()[k - 1];
		System.out.println(String.valueOf(after));
	}
}