import java.util.*;
import java.math.*;
import java.lang.*;
import java.io.*;
 
public class Main{
  public static void main(String args[]) throws IOException{
    Scanner s=new Scanner(System.in);
   
    int n=s.nextInt();
   int k=s.nextInt();
    
    String ss=s.next();
    
    System.out.println(ss.substring(0,k-1)+(char)(ss.charAt(k-1)+32)+ss.substring(k));
  }
} import java.util.*; util.* java import java.math.*; math.* java import java.lang.*; lang.* java import java.io.*; io.* java public class Main{
  public static void main(String args[]) throws IOException{
    Scanner s=new Scanner(System.in);
   
    int n=s.nextInt();
   int k=s.nextInt();
    
    String ss=s.next();
    
    System.out.println(ss.substring(0,k-1)+(char)(ss.charAt(k-1)+32)+ss.substring(k));
  }
} Main public static void main(String args[]) throws IOException{
    Scanner s=new Scanner(System.in);
   
    int n=s.nextInt();
   int k=s.nextInt();
    
    String ss=s.next();
    
    System.out.println(ss.substring(0,k-1)+(char)(ss.charAt(k-1)+32)+ss.substring(k));
  } main {
    Scanner s=new Scanner(System.in);
   
    int n=s.nextInt();
   int k=s.nextInt();
    
    String ss=s.next();
    
    System.out.println(ss.substring(0,k-1)+(char)(ss.charAt(k-1)+32)+ss.substring(k));
  } Scanner s=new Scanner(System.in); s new Scanner(System.in) int n=s.nextInt(); n s.nextInt() s.nextInt s int k=s.nextInt(); k s.nextInt() s.nextInt s String ss=s.next(); ss s.next() s.next s System.out.println(ss.substring(0,k-1)+(char)(ss.charAt(k-1)+32)+ss.substring(k)) System.out.println System.out System System.out ss.substring(0,k-1)+(char)(ss.charAt(k-1)+32)+ss.substring(k) ss.substring(0,k-1)+(char)(ss.charAt(k-1)+32)+ss.substring(k) ss.substring(0,k-1) ss.substring ss 0 k-1 k 1 (char)(ss.charAt(k-1)+32) ss.charAt(k-1) ss.charAt ss k-1 k 1 32 ss.substring(k) ss.substring ss k String args[] args public class Main{
  public static void main(String args[]) throws IOException{
    Scanner s=new Scanner(System.in);
   
    int n=s.nextInt();
   int k=s.nextInt();
    
    String ss=s.next();
    
    System.out.println(ss.substring(0,k-1)+(char)(ss.charAt(k-1)+32)+ss.substring(k));
  }
} public class Main{
  public static void main(String args[]) throws IOException{
    Scanner s=new Scanner(System.in);
   
    int n=s.nextInt();
   int k=s.nextInt();
    
    String ss=s.next();
    
    System.out.println(ss.substring(0,k-1)+(char)(ss.charAt(k-1)+32)+ss.substring(k));
  }
} Main
import java.util.*;
import java.math.*;
import java.lang.*;
import java.io.*;
 
public class Main{
  public static void main(String args[]) throws IOException{
    Scanner s=new Scanner(System.in);
   
    int n=s.nextInt();
   int k=s.nextInt();
    
    String ss=s.next();
    
    System.out.println(ss.substring(0,k-1)+(char)(ss.charAt(k-1)+32)+ss.substring(k));
  }
}