import java.util.Scanner;

/**
 * https://atcoder.jp/contests/abc126/tasks/abc126_a
 */
public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();
		sc.close();

		char[] ans = S.toCharArray();
		ans[K - 1] = Character.toLowerCase(ans[K - 1]);

		System.out.println(String.valueOf(ans));
	}

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

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();
		sc.close();

		char[] ans = S.toCharArray();
		ans[K - 1] = Character.toLowerCase(ans[K - 1]);

		System.out.println(String.valueOf(ans));
	}

} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();
		sc.close();

		char[] ans = S.toCharArray();
		ans[K - 1] = Character.toLowerCase(ans[K - 1]);

		System.out.println(String.valueOf(ans));
	} main {

		Scanner sc = new Scanner(System.in);
		sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();
		sc.close();

		char[] ans = S.toCharArray();
		ans[K - 1] = Character.toLowerCase(ans[K - 1]);

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

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();
		sc.close();

		char[] ans = S.toCharArray();
		ans[K - 1] = Character.toLowerCase(ans[K - 1]);

		System.out.println(String.valueOf(ans));
	}

} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();
		sc.close();

		char[] ans = S.toCharArray();
		ans[K - 1] = Character.toLowerCase(ans[K - 1]);

		System.out.println(String.valueOf(ans));
	}

} Main
import java.util.Scanner;

/**
 * https://atcoder.jp/contests/abc126/tasks/abc126_a
 */
public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		sc.nextInt();
		int K = sc.nextInt();
		String S = sc.next();
		sc.close();

		char[] ans = S.toCharArray();
		ans[K - 1] = Character.toLowerCase(ans[K - 1]);

		System.out.println(String.valueOf(ans));
	}

}
