import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int n = Integer.parseInt(str[0]);
    int k = Integer.parseInt(str[1]);
    String s = in.readLine();
    String tmp = String.valueOf(s.charAt(k-1)).toLowerCase();
    System.out.println(s.substring(0,k-1) + tmp + s.substring(k));
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.IOException; IOException java.io public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int n = Integer.parseInt(str[0]);
    int k = Integer.parseInt(str[1]);
    String s = in.readLine();
    String tmp = String.valueOf(s.charAt(k-1)).toLowerCase();
    System.out.println(s.substring(0,k-1) + tmp + s.substring(k));
  }
} Main public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int n = Integer.parseInt(str[0]);
    int k = Integer.parseInt(str[1]);
    String s = in.readLine();
    String tmp = String.valueOf(s.charAt(k-1)).toLowerCase();
    System.out.println(s.substring(0,k-1) + tmp + s.substring(k));
  } main {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int n = Integer.parseInt(str[0]);
    int k = Integer.parseInt(str[1]);
    String s = in.readLine();
    String tmp = String.valueOf(s.charAt(k-1)).toLowerCase();
    System.out.println(s.substring(0,k-1) + tmp + s.substring(k));
  } BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) String[] str = in.readLine().split(" "); str in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " int n = Integer.parseInt(str[0]); n Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 int k = Integer.parseInt(str[1]); k Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 String s = in.readLine(); s in.readLine() in.readLine in String tmp = String.valueOf(s.charAt(k-1)).toLowerCase(); tmp String.valueOf(s.charAt(k-1)).toLowerCase() String.valueOf(s.charAt(k-1)).toLowerCase String.valueOf(s.charAt(k-1)) String.valueOf String s.charAt(k-1) s.charAt s k-1 k 1 System.out.println(s.substring(0,k-1) + tmp + s.substring(k)) System.out.println System.out System System.out s.substring(0,k-1) + tmp + s.substring(k) s.substring(0,k-1) + tmp + s.substring(k) s.substring(0,k-1) s.substring s 0 k-1 k 1 tmp s.substring(k) s.substring s k String[] args args public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int n = Integer.parseInt(str[0]);
    int k = Integer.parseInt(str[1]);
    String s = in.readLine();
    String tmp = String.valueOf(s.charAt(k-1)).toLowerCase();
    System.out.println(s.substring(0,k-1) + tmp + s.substring(k));
  }
} public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int n = Integer.parseInt(str[0]);
    int k = Integer.parseInt(str[1]);
    String s = in.readLine();
    String tmp = String.valueOf(s.charAt(k-1)).toLowerCase();
    System.out.println(s.substring(0,k-1) + tmp + s.substring(k));
  }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int n = Integer.parseInt(str[0]);
    int k = Integer.parseInt(str[1]);
    String s = in.readLine();
    String tmp = String.valueOf(s.charAt(k-1)).toLowerCase();
    System.out.println(s.substring(0,k-1) + tmp + s.substring(k));
  }
}