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){
            System.out.print(Character.toLowerCase(S.charAt(i)));
          }else{
            System.out.print(S.charAt(i));
          }
        }
	}
} 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){
            System.out.print(Character.toLowerCase(S.charAt(i)));
          }else{
            System.out.print(S.charAt(i));
          }
        }
	}
} 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){
            System.out.print(Character.toLowerCase(S.charAt(i)));
          }else{
            System.out.print(S.charAt(i));
          }
        }
	} 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){
            System.out.print(Character.toLowerCase(S.charAt(i)));
          }else{
            System.out.print(S.charAt(i));
          }
        }
	} 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){
            System.out.print(Character.toLowerCase(S.charAt(i)));
          }else{
            System.out.print(S.charAt(i));
          }
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
          if (i+1 == K){
            System.out.print(Character.toLowerCase(S.charAt(i)));
          }else{
            System.out.print(S.charAt(i));
          }
        } {
          if (i+1 == K){
            System.out.print(Character.toLowerCase(S.charAt(i)));
          }else{
            System.out.print(S.charAt(i));
          }
        } if (i+1 == K){
            System.out.print(Character.toLowerCase(S.charAt(i)));
          }else{
            System.out.print(S.charAt(i));
          } i+1 == K i+1 i 1 K {
            System.out.print(Character.toLowerCase(S.charAt(i)));
          } System.out.print(Character.toLowerCase(S.charAt(i))) System.out.print System.out System System.out Character.toLowerCase(S.charAt(i)) Character.toLowerCase Character S.charAt(i) S.charAt S i {
            System.out.print(S.charAt(i));
          } System.out.print(S.charAt(i)) System.out.print System.out System System.out S.charAt(i) S.charAt S i 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){
            System.out.print(Character.toLowerCase(S.charAt(i)));
          }else{
            System.out.print(S.charAt(i));
          }
        }
	}
} 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){
            System.out.print(Character.toLowerCase(S.charAt(i)));
          }else{
            System.out.print(S.charAt(i));
          }
        }
	}
} 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){
            System.out.print(Character.toLowerCase(S.charAt(i)));
          }else{
            System.out.print(S.charAt(i));
          }
        }
	}
}