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().split("");
		s[k - 1] = s[k -1].toLowerCase();

		System.out.println(String.join("", s));
	}
} 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().split("");
		s[k - 1] = s[k -1].toLowerCase();

		System.out.println(String.join("", s));
	}
} 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().split("");
		s[k - 1] = s[k -1].toLowerCase();

		System.out.println(String.join("", s));
	} main {

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int k = sc.nextInt();

		String[] s = sc.next().split("");
		s[k - 1] = s[k -1].toLowerCase();

		System.out.println(String.join("", s));
	} 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().split(""); s sc.next().split("") sc.next().split sc.next() sc.next sc "" s[k - 1] = s[k -1].toLowerCase() s[k - 1] s k - 1 k 1 s[k -1].toLowerCase() s[k -1].toLowerCase s[k -1] s k -1 k 1 System.out.println(String.join("", s)) System.out.println System.out System System.out String.join("", s) String.join String "" s 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().split("");
		s[k - 1] = s[k -1].toLowerCase();

		System.out.println(String.join("", s));
	}
} 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().split("");
		s[k - 1] = s[k -1].toLowerCase();

		System.out.println(String.join("", s));
	}
} 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().split("");
		s[k - 1] = s[k -1].toLowerCase();

		System.out.println(String.join("", s));
	}
}