import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);

		//入力表示
		int N = sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();

		char c[] = S.toCharArray();
		c[K - 1] = Character.toLowerCase(c[K - 1]);
		System.out.println(new String(c));
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);

		//入力表示
		int N = sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();

		char c[] = S.toCharArray();
		c[K - 1] = Character.toLowerCase(c[K - 1]);
		System.out.println(new String(c));
	}
} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);

		//入力表示
		int N = sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();

		char c[] = S.toCharArray();
		c[K - 1] = Character.toLowerCase(c[K - 1]);
		System.out.println(new String(c));
	} main {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);

		//入力表示
		int N = sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();

		char c[] = S.toCharArray();
		c[K - 1] = Character.toLowerCase(c[K - 1]);
		System.out.println(new String(c));
	} 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 c[] = S.toCharArray(); c S.toCharArray() S.toCharArray S c[K - 1] = Character.toLowerCase(c[K - 1]) c[K - 1] c K - 1 K 1 Character.toLowerCase(c[K - 1]) Character.toLowerCase Character c[K - 1] c K - 1 K 1 System.out.println(new String(c)) System.out.println System.out System System.out new String(c) String[] args args public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);

		//入力表示
		int N = sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();

		char c[] = S.toCharArray();
		c[K - 1] = Character.toLowerCase(c[K - 1]);
		System.out.println(new String(c));
	}
} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);

		//入力表示
		int N = sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();

		char c[] = S.toCharArray();
		c[K - 1] = Character.toLowerCase(c[K - 1]);
		System.out.println(new String(c));
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);

		//入力表示
		int N = sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();

		char c[] = S.toCharArray();
		c[K - 1] = Character.toLowerCase(c[K - 1]);
		System.out.println(new String(c));
	}
}
