import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
        int K = sc.nextInt();
		String S = sc.next();
		
        for(int i=0;i<N;i++){
          if (i+1 == K){
            String tmp = (S.substring(i,i+1));
            System.out.print(tmp.toLowerCase());
          }else{
            System.out.print((S.substring(i,i+1)));
          }
        }
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
        int K = sc.nextInt();
		String S = sc.next();
		
        for(int i=0;i<N;i++){
          if (i+1 == K){
            String tmp = (S.substring(i,i+1));
            System.out.print(tmp.toLowerCase());
          }else{
            System.out.print((S.substring(i,i+1)));
          }
        }
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
        int K = sc.nextInt();
		String S = sc.next();
		
        for(int i=0;i<N;i++){
          if (i+1 == K){
            String tmp = (S.substring(i,i+1));
            System.out.print(tmp.toLowerCase());
          }else{
            System.out.print((S.substring(i,i+1)));
          }
        }
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
        int K = sc.nextInt();
		String S = sc.next();
		
        for(int i=0;i<N;i++){
          if (i+1 == K){
            String tmp = (S.substring(i,i+1));
            System.out.print(tmp.toLowerCase());
          }else{
            System.out.print((S.substring(i,i+1)));
          }
        }
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int K = sc.nextInt(); K sc.nextInt() sc.nextInt sc String S = sc.next(); S sc.next() sc.next sc for(int i=0;i<N;i++){
          if (i+1 == K){
            String tmp = (S.substring(i,i+1));
            System.out.print(tmp.toLowerCase());
          }else{
            System.out.print((S.substring(i,i+1)));
          }
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
          if (i+1 == K){
            String tmp = (S.substring(i,i+1));
            System.out.print(tmp.toLowerCase());
          }else{
            System.out.print((S.substring(i,i+1)));
          }
        } {
          if (i+1 == K){
            String tmp = (S.substring(i,i+1));
            System.out.print(tmp.toLowerCase());
          }else{
            System.out.print((S.substring(i,i+1)));
          }
        } if (i+1 == K){
            String tmp = (S.substring(i,i+1));
            System.out.print(tmp.toLowerCase());
          }else{
            System.out.print((S.substring(i,i+1)));
          } i+1 == K i+1 i 1 K {
            String tmp = (S.substring(i,i+1));
            System.out.print(tmp.toLowerCase());
          } String tmp = (S.substring(i,i+1)); tmp (S.substring(i,i+1)) S.substring S i i+1 i 1 System.out.print(tmp.toLowerCase()) System.out.print System.out System System.out tmp.toLowerCase() tmp.toLowerCase tmp {
            System.out.print((S.substring(i,i+1)));
          } System.out.print((S.substring(i,i+1))) System.out.print System.out System System.out (S.substring(i,i+1)) S.substring S i i+1 i 1 String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
        int K = sc.nextInt();
		String S = sc.next();
		
        for(int i=0;i<N;i++){
          if (i+1 == K){
            String tmp = (S.substring(i,i+1));
            System.out.print(tmp.toLowerCase());
          }else{
            System.out.print((S.substring(i,i+1)));
          }
        }
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
        int K = sc.nextInt();
		String S = sc.next();
		
        for(int i=0;i<N;i++){
          if (i+1 == K){
            String tmp = (S.substring(i,i+1));
            System.out.print(tmp.toLowerCase());
          }else{
            System.out.print((S.substring(i,i+1)));
          }
        }
	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
        int K = sc.nextInt();
		String S = sc.next();
		
        for(int i=0;i<N;i++){
          if (i+1 == K){
            String tmp = (S.substring(i,i+1));
            System.out.print(tmp.toLowerCase());
          }else{
            System.out.print((S.substring(i,i+1)));
          }
        }
	}
}