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