import java.util.Scanner;

public class Main {

  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    String line = scan.nextLine();
    int max = Integer.parseInt(line.split(" ")[0]);
    int target =Integer.parseInt(line.split(" ")[1]);
    line = scan.nextLine();
    char ch = line.charAt(target-1);
    ch = (char) (ch + 0x20);
    System.out.print(line.substring(0, target-1)+ ch + line.substring(target,max) );

  }

} import java.util.Scanner; Scanner java.util public class Main {

  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    String line = scan.nextLine();
    int max = Integer.parseInt(line.split(" ")[0]);
    int target =Integer.parseInt(line.split(" ")[1]);
    line = scan.nextLine();
    char ch = line.charAt(target-1);
    ch = (char) (ch + 0x20);
    System.out.print(line.substring(0, target-1)+ ch + line.substring(target,max) );

  }

} Main public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    String line = scan.nextLine();
    int max = Integer.parseInt(line.split(" ")[0]);
    int target =Integer.parseInt(line.split(" ")[1]);
    line = scan.nextLine();
    char ch = line.charAt(target-1);
    ch = (char) (ch + 0x20);
    System.out.print(line.substring(0, target-1)+ ch + line.substring(target,max) );

  } main {
    Scanner scan = new Scanner(System.in);
    String line = scan.nextLine();
    int max = Integer.parseInt(line.split(" ")[0]);
    int target =Integer.parseInt(line.split(" ")[1]);
    line = scan.nextLine();
    char ch = line.charAt(target-1);
    ch = (char) (ch + 0x20);
    System.out.print(line.substring(0, target-1)+ ch + line.substring(target,max) );

  } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String line = scan.nextLine(); line scan.nextLine() scan.nextLine scan int max = Integer.parseInt(line.split(" ")[0]); max Integer.parseInt(line.split(" ")[0]) Integer.parseInt Integer line.split(" ")[0] line.split(" ") line.split line " " 0 int target =Integer.parseInt(line.split(" ")[1]); target Integer.parseInt(line.split(" ")[1]) Integer.parseInt Integer line.split(" ")[1] line.split(" ") line.split line " " 1 line = scan.nextLine() line scan.nextLine() scan.nextLine scan char ch = line.charAt(target-1); ch line.charAt(target-1) line.charAt line target-1 target 1 ch = (char) (ch + 0x20) ch (char) (ch + 0x20) ch 0x20 System.out.print(line.substring(0, target-1)+ ch + line.substring(target,max) ) System.out.print System.out System System.out line.substring(0, target-1)+ ch + line.substring(target,max) line.substring(0, target-1)+ ch + line.substring(target,max) line.substring(0, target-1) line.substring line 0 target-1 target 1 ch line.substring(target,max) line.substring line target max String[] args args public class Main {

  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    String line = scan.nextLine();
    int max = Integer.parseInt(line.split(" ")[0]);
    int target =Integer.parseInt(line.split(" ")[1]);
    line = scan.nextLine();
    char ch = line.charAt(target-1);
    ch = (char) (ch + 0x20);
    System.out.print(line.substring(0, target-1)+ ch + line.substring(target,max) );

  }

} public class Main {

  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    String line = scan.nextLine();
    int max = Integer.parseInt(line.split(" ")[0]);
    int target =Integer.parseInt(line.split(" ")[1]);
    line = scan.nextLine();
    char ch = line.charAt(target-1);
    ch = (char) (ch + 0x20);
    System.out.print(line.substring(0, target-1)+ ch + line.substring(target,max) );

  }

} Main
import java.util.Scanner;

public class Main {

  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    String line = scan.nextLine();
    int max = Integer.parseInt(line.split(" ")[0]);
    int target =Integer.parseInt(line.split(" ")[1]);
    line = scan.nextLine();
    char ch = line.charAt(target-1);
    ch = (char) (ch + 0x20);
    System.out.print(line.substring(0, target-1)+ ch + line.substring(target,max) );

  }

}