import java.util.*;
class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int a=sc.nextInt(),b=sc.nextInt();
    String  str = sc.next();
    String[] strarr = str.split("");
    if(strarr[b-1].equals("A")){
      strarr[b-1] = "a";
    }
    else if(strarr[b-1].equals("B")){
      strarr[b-1] = "b";
    }
    else if(strarr[b-1].equals("C")){
      strarr[b-1] = "c";
    }
    String str2 = String.join("",strarr);
    System.out.println(str2);
  }
} import java.util.*; util.* java class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int a=sc.nextInt(),b=sc.nextInt();
    String  str = sc.next();
    String[] strarr = str.split("");
    if(strarr[b-1].equals("A")){
      strarr[b-1] = "a";
    }
    else if(strarr[b-1].equals("B")){
      strarr[b-1] = "b";
    }
    else if(strarr[b-1].equals("C")){
      strarr[b-1] = "c";
    }
    String str2 = String.join("",strarr);
    System.out.println(str2);
  }
} Main public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int a=sc.nextInt(),b=sc.nextInt();
    String  str = sc.next();
    String[] strarr = str.split("");
    if(strarr[b-1].equals("A")){
      strarr[b-1] = "a";
    }
    else if(strarr[b-1].equals("B")){
      strarr[b-1] = "b";
    }
    else if(strarr[b-1].equals("C")){
      strarr[b-1] = "c";
    }
    String str2 = String.join("",strarr);
    System.out.println(str2);
  } main {
    Scanner sc = new Scanner(System.in);
    int a=sc.nextInt(),b=sc.nextInt();
    String  str = sc.next();
    String[] strarr = str.split("");
    if(strarr[b-1].equals("A")){
      strarr[b-1] = "a";
    }
    else if(strarr[b-1].equals("B")){
      strarr[b-1] = "b";
    }
    else if(strarr[b-1].equals("C")){
      strarr[b-1] = "c";
    }
    String str2 = String.join("",strarr);
    System.out.println(str2);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a=sc.nextInt() a sc.nextInt() sc.nextInt sc b=sc.nextInt(); b sc.nextInt() sc.nextInt sc String  str = sc.next(); str sc.next() sc.next sc String[] strarr = str.split(""); strarr str.split("") str.split str "" if(strarr[b-1].equals("A")){
      strarr[b-1] = "a";
    }
    else if(strarr[b-1].equals("B")){
      strarr[b-1] = "b";
    }
    else if(strarr[b-1].equals("C")){
      strarr[b-1] = "c";
    } strarr[b-1].equals("A") strarr[b-1].equals strarr[b-1] strarr b-1 b 1 "A" {
      strarr[b-1] = "a";
    } strarr[b-1] = "a" strarr[b-1] strarr b-1 b 1 "a" if(strarr[b-1].equals("B")){
      strarr[b-1] = "b";
    }
    else if(strarr[b-1].equals("C")){
      strarr[b-1] = "c";
    } strarr[b-1].equals("B") strarr[b-1].equals strarr[b-1] strarr b-1 b 1 "B" {
      strarr[b-1] = "b";
    } strarr[b-1] = "b" strarr[b-1] strarr b-1 b 1 "b" if(strarr[b-1].equals("C")){
      strarr[b-1] = "c";
    } strarr[b-1].equals("C") strarr[b-1].equals strarr[b-1] strarr b-1 b 1 "C" {
      strarr[b-1] = "c";
    } strarr[b-1] = "c" strarr[b-1] strarr b-1 b 1 "c" String str2 = String.join("",strarr); str2 String.join("",strarr) String.join String "" strarr System.out.println(str2) System.out.println System.out System System.out str2 String args[] args
import java.util.*;
class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int a=sc.nextInt(),b=sc.nextInt();
    String  str = sc.next();
    String[] strarr = str.split("");
    if(strarr[b-1].equals("A")){
      strarr[b-1] = "a";
    }
    else if(strarr[b-1].equals("B")){
      strarr[b-1] = "b";
    }
    else if(strarr[b-1].equals("C")){
      strarr[b-1] = "c";
    }
    String str2 = String.join("",strarr);
    System.out.println(str2);
  }
}