
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

class Main {

	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		Scanner scanner = new Scanner(br.readLine());
		scanner.nextInt();
		int k = scanner.nextInt() -1;
		scanner.close();
		String string = br.readLine();

		char characters[] = new char[string.length()];
		for(int i=0; i<string.length(); i++) {
			characters[i] = string.charAt(i);
		}
		characters[k] = Character.toLowerCase(characters[k]);
		System.out.println(String.valueOf(characters));

	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Scanner; Scanner java.util class Main {

	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		Scanner scanner = new Scanner(br.readLine());
		scanner.nextInt();
		int k = scanner.nextInt() -1;
		scanner.close();
		String string = br.readLine();

		char characters[] = new char[string.length()];
		for(int i=0; i<string.length(); i++) {
			characters[i] = string.charAt(i);
		}
		characters[k] = Character.toLowerCase(characters[k]);
		System.out.println(String.valueOf(characters));

	}

} Main public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		Scanner scanner = new Scanner(br.readLine());
		scanner.nextInt();
		int k = scanner.nextInt() -1;
		scanner.close();
		String string = br.readLine();

		char characters[] = new char[string.length()];
		for(int i=0; i<string.length(); i++) {
			characters[i] = string.charAt(i);
		}
		characters[k] = Character.toLowerCase(characters[k]);
		System.out.println(String.valueOf(characters));

	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		Scanner scanner = new Scanner(br.readLine());
		scanner.nextInt();
		int k = scanner.nextInt() -1;
		scanner.close();
		String string = br.readLine();

		char characters[] = new char[string.length()];
		for(int i=0; i<string.length(); i++) {
			characters[i] = string.charAt(i);
		}
		characters[k] = Character.toLowerCase(characters[k]);
		System.out.println(String.valueOf(characters));

	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) Scanner scanner = new Scanner(br.readLine()); scanner new Scanner(br.readLine()) scanner.nextInt() scanner.nextInt scanner int k = scanner.nextInt() -1; k scanner.nextInt() -1 scanner.nextInt() scanner.nextInt scanner 1 scanner.close() scanner.close scanner String string = br.readLine(); string br.readLine() br.readLine br char characters[] = new char[string.length()]; characters new char[string.length()] string.length() string.length string for(int i=0; i<string.length(); i++) {
			characters[i] = string.charAt(i);
		} int i=0; int i=0; i 0 i<string.length() i string.length() string.length string i++ i++ i {
			characters[i] = string.charAt(i);
		} {
			characters[i] = string.charAt(i);
		} characters[i] = string.charAt(i) characters[i] characters i string.charAt(i) string.charAt string i characters[k] = Character.toLowerCase(characters[k]) characters[k] characters k Character.toLowerCase(characters[k]) Character.toLowerCase Character characters[k] characters k System.out.println(String.valueOf(characters)) System.out.println System.out System System.out String.valueOf(characters) String.valueOf String characters String[] args args

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

class Main {

	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		Scanner scanner = new Scanner(br.readLine());
		scanner.nextInt();
		int k = scanner.nextInt() -1;
		scanner.close();
		String string = br.readLine();

		char characters[] = new char[string.length()];
		for(int i=0; i<string.length(); i++) {
			characters[i] = string.charAt(i);
		}
		characters[k] = Character.toLowerCase(characters[k]);
		System.out.println(String.valueOf(characters));

	}

}
