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 answer = sc.next();
    StringBuilder sb = new StringBuilder();
    sb.append(answer);
    char tmp = sb.charAt(k-1);
    if(tmp=='A'){
      sb.setCharAt(k-1,'a');
    }else if(tmp=='B'){
      sb.setCharAt(k-1,'b');
    }else{
      sb.setCharAt(k-1,'c');
    }
    answer = sb.toString();
 //   System.out.print()
//    if(answer[n-1]=="A"){
//      answer[n-1]="a";
//    }else if(answer[n-1]=="B"){
//      answer[n-1]="b";
//    }else{
//      answer[n-1]="c";
//    }
    System.out.println(answer);
  }
} 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 answer = sc.next();
    StringBuilder sb = new StringBuilder();
    sb.append(answer);
    char tmp = sb.charAt(k-1);
    if(tmp=='A'){
      sb.setCharAt(k-1,'a');
    }else if(tmp=='B'){
      sb.setCharAt(k-1,'b');
    }else{
      sb.setCharAt(k-1,'c');
    }
    answer = sb.toString();
 //   System.out.print()
//    if(answer[n-1]=="A"){
//      answer[n-1]="a";
//    }else if(answer[n-1]=="B"){
//      answer[n-1]="b";
//    }else{
//      answer[n-1]="c";
//    }
    System.out.println(answer);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int k = sc.nextInt();
    String answer = sc.next();
    StringBuilder sb = new StringBuilder();
    sb.append(answer);
    char tmp = sb.charAt(k-1);
    if(tmp=='A'){
      sb.setCharAt(k-1,'a');
    }else if(tmp=='B'){
      sb.setCharAt(k-1,'b');
    }else{
      sb.setCharAt(k-1,'c');
    }
    answer = sb.toString();
 //   System.out.print()
//    if(answer[n-1]=="A"){
//      answer[n-1]="a";
//    }else if(answer[n-1]=="B"){
//      answer[n-1]="b";
//    }else{
//      answer[n-1]="c";
//    }
    System.out.println(answer);
  } main {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int k = sc.nextInt();
    String answer = sc.next();
    StringBuilder sb = new StringBuilder();
    sb.append(answer);
    char tmp = sb.charAt(k-1);
    if(tmp=='A'){
      sb.setCharAt(k-1,'a');
    }else if(tmp=='B'){
      sb.setCharAt(k-1,'b');
    }else{
      sb.setCharAt(k-1,'c');
    }
    answer = sb.toString();
 //   System.out.print()
//    if(answer[n-1]=="A"){
//      answer[n-1]="a";
//    }else if(answer[n-1]=="B"){
//      answer[n-1]="b";
//    }else{
//      answer[n-1]="c";
//    }
    System.out.println(answer);
  } 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 answer = sc.next(); answer sc.next() sc.next sc StringBuilder sb = new StringBuilder(); sb new StringBuilder() sb.append(answer) sb.append sb answer char tmp = sb.charAt(k-1); tmp sb.charAt(k-1) sb.charAt sb k-1 k 1 if(tmp=='A'){
      sb.setCharAt(k-1,'a');
    }else if(tmp=='B'){
      sb.setCharAt(k-1,'b');
    }else{
      sb.setCharAt(k-1,'c');
    } tmp=='A' tmp 'A' {
      sb.setCharAt(k-1,'a');
    } sb.setCharAt(k-1,'a') sb.setCharAt sb k-1 k 1 'a' if(tmp=='B'){
      sb.setCharAt(k-1,'b');
    }else{
      sb.setCharAt(k-1,'c');
    } tmp=='B' tmp 'B' {
      sb.setCharAt(k-1,'b');
    } sb.setCharAt(k-1,'b') sb.setCharAt sb k-1 k 1 'b' {
      sb.setCharAt(k-1,'c');
    } sb.setCharAt(k-1,'c') sb.setCharAt sb k-1 k 1 'c' answer = sb.toString() answer sb.toString() sb.toString sb System.out.println(answer) System.out.println System.out System System.out answer 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 answer = sc.next();
    StringBuilder sb = new StringBuilder();
    sb.append(answer);
    char tmp = sb.charAt(k-1);
    if(tmp=='A'){
      sb.setCharAt(k-1,'a');
    }else if(tmp=='B'){
      sb.setCharAt(k-1,'b');
    }else{
      sb.setCharAt(k-1,'c');
    }
    answer = sb.toString();
 //   System.out.print()
//    if(answer[n-1]=="A"){
//      answer[n-1]="a";
//    }else if(answer[n-1]=="B"){
//      answer[n-1]="b";
//    }else{
//      answer[n-1]="c";
//    }
    System.out.println(answer);
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int k = sc.nextInt();
    String answer = sc.next();
    StringBuilder sb = new StringBuilder();
    sb.append(answer);
    char tmp = sb.charAt(k-1);
    if(tmp=='A'){
      sb.setCharAt(k-1,'a');
    }else if(tmp=='B'){
      sb.setCharAt(k-1,'b');
    }else{
      sb.setCharAt(k-1,'c');
    }
    answer = sb.toString();
 //   System.out.print()
//    if(answer[n-1]=="A"){
//      answer[n-1]="a";
//    }else if(answer[n-1]=="B"){
//      answer[n-1]="b";
//    }else{
//      answer[n-1]="c";
//    }
    System.out.println(answer);
  }
} 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 answer = sc.next();
    StringBuilder sb = new StringBuilder();
    sb.append(answer);
    char tmp = sb.charAt(k-1);
    if(tmp=='A'){
      sb.setCharAt(k-1,'a');
    }else if(tmp=='B'){
      sb.setCharAt(k-1,'b');
    }else{
      sb.setCharAt(k-1,'c');
    }
    answer = sb.toString();
 //   System.out.print()
//    if(answer[n-1]=="A"){
//      answer[n-1]="a";
//    }else if(answer[n-1]=="B"){
//      answer[n-1]="b";
//    }else{
//      answer[n-1]="c";
//    }
    System.out.println(answer);
  }
}