import java.util.*;

public class Main {
	public static void main(String[] args) {  
  		Scanner sc = new Scanner(System.in);
		int length = sc.nextInt();
      	int lowPos = sc.nextInt();
      	String str = sc.next();
      
      	String[] ary = str.split("", 0);
      	for(int i = 0; i < length; i++) {
        	if(i == lowPos -1 ) ary[i] = ary[i].toLowerCase();
          	System.out.print(ary[i]);
        }
    }
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {  
  		Scanner sc = new Scanner(System.in);
		int length = sc.nextInt();
      	int lowPos = sc.nextInt();
      	String str = sc.next();
      
      	String[] ary = str.split("", 0);
      	for(int i = 0; i < length; i++) {
        	if(i == lowPos -1 ) ary[i] = ary[i].toLowerCase();
          	System.out.print(ary[i]);
        }
    }
} Main public static void main(String[] args) {  
  		Scanner sc = new Scanner(System.in);
		int length = sc.nextInt();
      	int lowPos = sc.nextInt();
      	String str = sc.next();
      
      	String[] ary = str.split("", 0);
      	for(int i = 0; i < length; i++) {
        	if(i == lowPos -1 ) ary[i] = ary[i].toLowerCase();
          	System.out.print(ary[i]);
        }
    } main {  
  		Scanner sc = new Scanner(System.in);
		int length = sc.nextInt();
      	int lowPos = sc.nextInt();
      	String str = sc.next();
      
      	String[] ary = str.split("", 0);
      	for(int i = 0; i < length; i++) {
        	if(i == lowPos -1 ) ary[i] = ary[i].toLowerCase();
          	System.out.print(ary[i]);
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int length = sc.nextInt(); length sc.nextInt() sc.nextInt sc int lowPos = sc.nextInt(); lowPos sc.nextInt() sc.nextInt sc String str = sc.next(); str sc.next() sc.next sc String[] ary = str.split("", 0); ary str.split("", 0) str.split str "" 0 for(int i = 0; i < length; i++) {
        	if(i == lowPos -1 ) ary[i] = ary[i].toLowerCase();
          	System.out.print(ary[i]);
        } int i = 0; int i = 0; i 0 i < length i length i++ i++ i {
        	if(i == lowPos -1 ) ary[i] = ary[i].toLowerCase();
          	System.out.print(ary[i]);
        } {
        	if(i == lowPos -1 ) ary[i] = ary[i].toLowerCase();
          	System.out.print(ary[i]);
        } if(i == lowPos -1 ) ary[i] = ary[i].toLowerCase(); i == lowPos -1 i lowPos -1 lowPos 1 ary[i] = ary[i].toLowerCase() ary[i] ary i ary[i].toLowerCase() ary[i].toLowerCase ary[i] ary i System.out.print(ary[i]) System.out.print System.out System System.out ary[i] ary i String[] args args public class Main {
	public static void main(String[] args) {  
  		Scanner sc = new Scanner(System.in);
		int length = sc.nextInt();
      	int lowPos = sc.nextInt();
      	String str = sc.next();
      
      	String[] ary = str.split("", 0);
      	for(int i = 0; i < length; i++) {
        	if(i == lowPos -1 ) ary[i] = ary[i].toLowerCase();
          	System.out.print(ary[i]);
        }
    }
} public class Main {
	public static void main(String[] args) {  
  		Scanner sc = new Scanner(System.in);
		int length = sc.nextInt();
      	int lowPos = sc.nextInt();
      	String str = sc.next();
      
      	String[] ary = str.split("", 0);
      	for(int i = 0; i < length; i++) {
        	if(i == lowPos -1 ) ary[i] = ary[i].toLowerCase();
          	System.out.print(ary[i]);
        }
    }
} Main
import java.util.*;

public class Main {
	public static void main(String[] args) {  
  		Scanner sc = new Scanner(System.in);
		int length = sc.nextInt();
      	int lowPos = sc.nextInt();
      	String str = sc.next();
      
      	String[] ary = str.split("", 0);
      	for(int i = 0; i < length; i++) {
        	if(i == lowPos -1 ) ary[i] = ary[i].toLowerCase();
          	System.out.print(ary[i]);
        }
    }
}