import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String num = sc.nextLine();
      	String[] numSpl = num.split(" ");
      	int n = Integer.parseInt(numSpl[0]);
      	int k = Integer.parseInt(numSpl[1]);
		String s = sc.nextLine();
		

		String[] spl = s.split("");
		StringBuilder sb = new StringBuilder();
		for(int i = 0; i < n;i++){
			if(i == k-1){
				sb.append(spl[i].toLowerCase());
			}else{
				sb.append(spl[i]);
			}
		}
		System.out.println(sb);
		sc.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String num = sc.nextLine();
      	String[] numSpl = num.split(" ");
      	int n = Integer.parseInt(numSpl[0]);
      	int k = Integer.parseInt(numSpl[1]);
		String s = sc.nextLine();
		

		String[] spl = s.split("");
		StringBuilder sb = new StringBuilder();
		for(int i = 0; i < n;i++){
			if(i == k-1){
				sb.append(spl[i].toLowerCase());
			}else{
				sb.append(spl[i]);
			}
		}
		System.out.println(sb);
		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String num = sc.nextLine();
      	String[] numSpl = num.split(" ");
      	int n = Integer.parseInt(numSpl[0]);
      	int k = Integer.parseInt(numSpl[1]);
		String s = sc.nextLine();
		

		String[] spl = s.split("");
		StringBuilder sb = new StringBuilder();
		for(int i = 0; i < n;i++){
			if(i == k-1){
				sb.append(spl[i].toLowerCase());
			}else{
				sb.append(spl[i]);
			}
		}
		System.out.println(sb);
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		String num = sc.nextLine();
      	String[] numSpl = num.split(" ");
      	int n = Integer.parseInt(numSpl[0]);
      	int k = Integer.parseInt(numSpl[1]);
		String s = sc.nextLine();
		

		String[] spl = s.split("");
		StringBuilder sb = new StringBuilder();
		for(int i = 0; i < n;i++){
			if(i == k-1){
				sb.append(spl[i].toLowerCase());
			}else{
				sb.append(spl[i]);
			}
		}
		System.out.println(sb);
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String num = sc.nextLine(); num sc.nextLine() sc.nextLine sc String[] numSpl = num.split(" "); numSpl num.split(" ") num.split num " " int n = Integer.parseInt(numSpl[0]); n Integer.parseInt(numSpl[0]) Integer.parseInt Integer numSpl[0] numSpl 0 int k = Integer.parseInt(numSpl[1]); k Integer.parseInt(numSpl[1]) Integer.parseInt Integer numSpl[1] numSpl 1 String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc String[] spl = s.split(""); spl s.split("") s.split s "" StringBuilder sb = new StringBuilder(); sb new StringBuilder() for(int i = 0; i < n;i++){
			if(i == k-1){
				sb.append(spl[i].toLowerCase());
			}else{
				sb.append(spl[i]);
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			if(i == k-1){
				sb.append(spl[i].toLowerCase());
			}else{
				sb.append(spl[i]);
			}
		} {
			if(i == k-1){
				sb.append(spl[i].toLowerCase());
			}else{
				sb.append(spl[i]);
			}
		} if(i == k-1){
				sb.append(spl[i].toLowerCase());
			}else{
				sb.append(spl[i]);
			} i == k-1 i k-1 k 1 {
				sb.append(spl[i].toLowerCase());
			} sb.append(spl[i].toLowerCase()) sb.append sb spl[i].toLowerCase() spl[i].toLowerCase spl[i] spl i {
				sb.append(spl[i]);
			} sb.append(spl[i]) sb.append sb spl[i] spl i System.out.println(sb) System.out.println System.out System System.out sb sc.close() sc.close sc String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String num = sc.nextLine();
      	String[] numSpl = num.split(" ");
      	int n = Integer.parseInt(numSpl[0]);
      	int k = Integer.parseInt(numSpl[1]);
		String s = sc.nextLine();
		

		String[] spl = s.split("");
		StringBuilder sb = new StringBuilder();
		for(int i = 0; i < n;i++){
			if(i == k-1){
				sb.append(spl[i].toLowerCase());
			}else{
				sb.append(spl[i]);
			}
		}
		System.out.println(sb);
		sc.close();
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String num = sc.nextLine();
      	String[] numSpl = num.split(" ");
      	int n = Integer.parseInt(numSpl[0]);
      	int k = Integer.parseInt(numSpl[1]);
		String s = sc.nextLine();
		

		String[] spl = s.split("");
		StringBuilder sb = new StringBuilder();
		for(int i = 0; i < n;i++){
			if(i == k-1){
				sb.append(spl[i].toLowerCase());
			}else{
				sb.append(spl[i]);
			}
		}
		System.out.println(sb);
		sc.close();
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String num = sc.nextLine();
      	String[] numSpl = num.split(" ");
      	int n = Integer.parseInt(numSpl[0]);
      	int k = Integer.parseInt(numSpl[1]);
		String s = sc.nextLine();
		

		String[] spl = s.split("");
		StringBuilder sb = new StringBuilder();
		for(int i = 0; i < n;i++){
			if(i == k-1){
				sb.append(spl[i].toLowerCase());
			}else{
				sb.append(spl[i]);
			}
		}
		System.out.println(sb);
		sc.close();
	}
}