import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		int N    = scanner.nextInt();
		int K    = scanner.nextInt();
		String S = scanner.next();
		String answer = "";
			
		answer =  S.substring(0,K-1) + S.substring(K-1,K).toLowerCase() + S.substring(K);
		
		
		System.out.println(answer);
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		int N    = scanner.nextInt();
		int K    = scanner.nextInt();
		String S = scanner.next();
		String answer = "";
			
		answer =  S.substring(0,K-1) + S.substring(K-1,K).toLowerCase() + S.substring(K);
		
		
		System.out.println(answer);
	}
} Main public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		int N    = scanner.nextInt();
		int K    = scanner.nextInt();
		String S = scanner.next();
		String answer = "";
			
		answer =  S.substring(0,K-1) + S.substring(K-1,K).toLowerCase() + S.substring(K);
		
		
		System.out.println(answer);
	} main {

		Scanner scanner = new Scanner(System.in);
		int N    = scanner.nextInt();
		int K    = scanner.nextInt();
		String S = scanner.next();
		String answer = "";
			
		answer =  S.substring(0,K-1) + S.substring(K-1,K).toLowerCase() + S.substring(K);
		
		
		System.out.println(answer);
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N    = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner int K    = scanner.nextInt(); K scanner.nextInt() scanner.nextInt scanner String S = scanner.next(); S scanner.next() scanner.next scanner String answer = ""; answer "" answer =  S.substring(0,K-1) + S.substring(K-1,K).toLowerCase() + S.substring(K) answer S.substring(0,K-1) + S.substring(K-1,K).toLowerCase() + S.substring(K) S.substring(0,K-1) + S.substring(K-1,K).toLowerCase() + S.substring(K) S.substring(0,K-1) S.substring S 0 K-1 K 1 S.substring(K-1,K).toLowerCase() S.substring(K-1,K).toLowerCase S.substring(K-1,K) S.substring S K-1 K 1 K S.substring(K) S.substring S K System.out.println(answer) System.out.println System.out System System.out answer String[] args args public class Main {

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		int N    = scanner.nextInt();
		int K    = scanner.nextInt();
		String S = scanner.next();
		String answer = "";
			
		answer =  S.substring(0,K-1) + S.substring(K-1,K).toLowerCase() + S.substring(K);
		
		
		System.out.println(answer);
	}
} public class Main {

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		int N    = scanner.nextInt();
		int K    = scanner.nextInt();
		String S = scanner.next();
		String answer = "";
			
		answer =  S.substring(0,K-1) + S.substring(K-1,K).toLowerCase() + S.substring(K);
		
		
		System.out.println(answer);
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		int N    = scanner.nextInt();
		int K    = scanner.nextInt();
		String S = scanner.next();
		String answer = "";
			
		answer =  S.substring(0,K-1) + S.substring(K-1,K).toLowerCase() + S.substring(K);
		
		
		System.out.println(answer);
	}
}