import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			@SuppressWarnings("unused")
			int n = scanner.nextInt(), k = scanner.nextInt() - 1;
			char[] s = scanner.next().toCharArray();
			// 大文字から小文字へ変換
			s[k] += 'a' - 'A';
			System.out.println(s);
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			@SuppressWarnings("unused")
			int n = scanner.nextInt(), k = scanner.nextInt() - 1;
			char[] s = scanner.next().toCharArray();
			// 大文字から小文字へ変換
			s[k] += 'a' - 'A';
			System.out.println(s);
		}
	}
} Main public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			@SuppressWarnings("unused")
			int n = scanner.nextInt(), k = scanner.nextInt() - 1;
			char[] s = scanner.next().toCharArray();
			// 大文字から小文字へ変換
			s[k] += 'a' - 'A';
			System.out.println(s);
		}
	} main {
		try (Scanner scanner = new Scanner(System.in)) {
			@SuppressWarnings("unused")
			int n = scanner.nextInt(), k = scanner.nextInt() - 1;
			char[] s = scanner.next().toCharArray();
			// 大文字から小文字へ変換
			s[k] += 'a' - 'A';
			System.out.println(s);
		}
	} try (Scanner scanner = new Scanner(System.in)) {
			@SuppressWarnings("unused")
			int n = scanner.nextInt(), k = scanner.nextInt() - 1;
			char[] s = scanner.next().toCharArray();
			// 大文字から小文字へ変換
			s[k] += 'a' - 'A';
			System.out.println(s);
		} {
			@SuppressWarnings("unused")
			int n = scanner.nextInt(), k = scanner.nextInt() - 1;
			char[] s = scanner.next().toCharArray();
			// 大文字から小文字へ変換
			s[k] += 'a' - 'A';
			System.out.println(s);
		} Scanner scanner = new Scanner(System.in) Scanner scanner = new Scanner(System.in) new Scanner(System.in) @SuppressWarnings("unused")
			int n = scanner.nextInt() n scanner.nextInt() scanner.nextInt scanner k = scanner.nextInt() - 1; k scanner.nextInt() - 1 scanner.nextInt() scanner.nextInt scanner 1 char[] s = scanner.next().toCharArray(); s scanner.next().toCharArray() scanner.next().toCharArray scanner.next() scanner.next scanner s[k] += 'a' - 'A' s[k] s k 'a' - 'A' 'a' 'A' System.out.println(s) System.out.println System.out System System.out s String[] args args public class Main {

	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			@SuppressWarnings("unused")
			int n = scanner.nextInt(), k = scanner.nextInt() - 1;
			char[] s = scanner.next().toCharArray();
			// 大文字から小文字へ変換
			s[k] += 'a' - 'A';
			System.out.println(s);
		}
	}
} public class Main {

	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			@SuppressWarnings("unused")
			int n = scanner.nextInt(), k = scanner.nextInt() - 1;
			char[] s = scanner.next().toCharArray();
			// 大文字から小文字へ変換
			s[k] += 'a' - 'A';
			System.out.println(s);
		}
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			@SuppressWarnings("unused")
			int n = scanner.nextInt(), k = scanner.nextInt() - 1;
			char[] s = scanner.next().toCharArray();
			// 大文字から小文字へ変換
			s[k] += 'a' - 'A';
			System.out.println(s);
		}
	}
}
