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();
    String sm = s.substring(0,k-1);
    String sa = s.substring(k,s.length());
    String ss = s.substring(k-1,k).toLowerCase();
    System.out.println(sm + ss + sa);
  }
} 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();
    String sm = s.substring(0,k-1);
    String sa = s.substring(k,s.length());
    String ss = s.substring(k-1,k).toLowerCase();
    System.out.println(sm + ss + sa);
  }
} 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();
    String sm = s.substring(0,k-1);
    String sa = s.substring(k,s.length());
    String ss = s.substring(k-1,k).toLowerCase();
    System.out.println(sm + ss + sa);
  } main {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int k = sc.nextInt();
    String s = sc.next();
    String sm = s.substring(0,k-1);
    String sa = s.substring(k,s.length());
    String ss = s.substring(k-1,k).toLowerCase();
    System.out.println(sm + ss + sa);
  } 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 String sm = s.substring(0,k-1); sm s.substring(0,k-1) s.substring s 0 k-1 k 1 String sa = s.substring(k,s.length()); sa s.substring(k,s.length()) s.substring s k s.length() s.length s String ss = s.substring(k-1,k).toLowerCase(); ss s.substring(k-1,k).toLowerCase() s.substring(k-1,k).toLowerCase s.substring(k-1,k) s.substring s k-1 k 1 k System.out.println(sm + ss + sa) System.out.println System.out System System.out sm + ss + sa sm + ss + sa sm ss sa 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();
    String sm = s.substring(0,k-1);
    String sa = s.substring(k,s.length());
    String ss = s.substring(k-1,k).toLowerCase();
    System.out.println(sm + ss + sa);
  }
} 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();
    String sm = s.substring(0,k-1);
    String sa = s.substring(k,s.length());
    String ss = s.substring(k-1,k).toLowerCase();
    System.out.println(sm + ss + sa);
  }
} 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();
    String sm = s.substring(0,k-1);
    String sa = s.substring(k,s.length());
    String ss = s.substring(k-1,k).toLowerCase();
    System.out.println(sm + ss + sa);
  }
}
