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();
    char[] c = new char[n];
    c = s.toCharArray();

    if(c[k - 1] == 'A'){
      c[k - 1] = 'a';
    } else if(c[k - 1] == 'B'){
      c[k - 1] = 'b';
    } else {
      c[k - 1] = 'c';
    }

    for(int i = 0; i < n; i++){
      System.out.print(c[i]);
    }
  }
} 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();
    char[] c = new char[n];
    c = s.toCharArray();

    if(c[k - 1] == 'A'){
      c[k - 1] = 'a';
    } else if(c[k - 1] == 'B'){
      c[k - 1] = 'b';
    } else {
      c[k - 1] = 'c';
    }

    for(int i = 0; i < n; i++){
      System.out.print(c[i]);
    }
  }
} 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();
    char[] c = new char[n];
    c = s.toCharArray();

    if(c[k - 1] == 'A'){
      c[k - 1] = 'a';
    } else if(c[k - 1] == 'B'){
      c[k - 1] = 'b';
    } else {
      c[k - 1] = 'c';
    }

    for(int i = 0; i < n; i++){
      System.out.print(c[i]);
    }
  } main {
    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();
    int k = sc.nextInt();
    String s = sc.next();
    char[] c = new char[n];
    c = s.toCharArray();

    if(c[k - 1] == 'A'){
      c[k - 1] = 'a';
    } else if(c[k - 1] == 'B'){
      c[k - 1] = 'b';
    } else {
      c[k - 1] = 'c';
    }

    for(int i = 0; i < n; i++){
      System.out.print(c[i]);
    }
  } 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 char[] c = new char[n]; c new char[n] n c = s.toCharArray() c s.toCharArray() s.toCharArray s if(c[k - 1] == 'A'){
      c[k - 1] = 'a';
    } else if(c[k - 1] == 'B'){
      c[k - 1] = 'b';
    } else {
      c[k - 1] = 'c';
    } c[k - 1] == 'A' c[k - 1] c k - 1 k 1 'A' {
      c[k - 1] = 'a';
    } c[k - 1] = 'a' c[k - 1] c k - 1 k 1 'a' if(c[k - 1] == 'B'){
      c[k - 1] = 'b';
    } else {
      c[k - 1] = 'c';
    } c[k - 1] == 'B' c[k - 1] c k - 1 k 1 'B' {
      c[k - 1] = 'b';
    } c[k - 1] = 'b' c[k - 1] c k - 1 k 1 'b' {
      c[k - 1] = 'c';
    } c[k - 1] = 'c' c[k - 1] c k - 1 k 1 'c' for(int i = 0; i < n; i++){
      System.out.print(c[i]);
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      System.out.print(c[i]);
    } {
      System.out.print(c[i]);
    } System.out.print(c[i]) System.out.print System.out System System.out c[i] c i 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();
    char[] c = new char[n];
    c = s.toCharArray();

    if(c[k - 1] == 'A'){
      c[k - 1] = 'a';
    } else if(c[k - 1] == 'B'){
      c[k - 1] = 'b';
    } else {
      c[k - 1] = 'c';
    }

    for(int i = 0; i < n; i++){
      System.out.print(c[i]);
    }
  }
} 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();
    char[] c = new char[n];
    c = s.toCharArray();

    if(c[k - 1] == 'A'){
      c[k - 1] = 'a';
    } else if(c[k - 1] == 'B'){
      c[k - 1] = 'b';
    } else {
      c[k - 1] = 'c';
    }

    for(int i = 0; i < n; i++){
      System.out.print(c[i]);
    }
  }
} 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();
    char[] c = new char[n];
    c = s.toCharArray();

    if(c[k - 1] == 'A'){
      c[k - 1] = 'a';
    } else if(c[k - 1] == 'B'){
      c[k - 1] = 'b';
    } else {
      c[k - 1] = 'c';
    }

    for(int i = 0; i < n; i++){
      System.out.print(c[i]);
    }
  }
}
