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 str = sc.next();
    char[] c = new char[n];

    for (int i = 0 ; i < n ; i++ ) {
      c[i] = str.charAt(i);
    }

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

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

    if (c[k-1] == 'C') {
      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 str = sc.next();
    char[] c = new char[n];

    for (int i = 0 ; i < n ; i++ ) {
      c[i] = str.charAt(i);
    }

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

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

    if (c[k-1] == 'C') {
      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 str = sc.next();
    char[] c = new char[n];

    for (int i = 0 ; i < n ; i++ ) {
      c[i] = str.charAt(i);
    }

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

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

    if (c[k-1] == 'C') {
      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 str = sc.next();
    char[] c = new char[n];

    for (int i = 0 ; i < n ; i++ ) {
      c[i] = str.charAt(i);
    }

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

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

    if (c[k-1] == 'C') {
      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 str = sc.next(); str sc.next() sc.next sc char[] c = new char[n]; c new char[n] n for (int i = 0 ; i < n ; i++ ) {
      c[i] = str.charAt(i);
    } int i = 0 ; int i = 0 ; i 0 i < n i n i++ i++ i {
      c[i] = str.charAt(i);
    } {
      c[i] = str.charAt(i);
    } c[i] = str.charAt(i) c[i] c i str.charAt(i) str.charAt str i if (c[k-1] == 'A') {
      c[k-1] = 'a';
    } 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';
    } 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' if (c[k-1] == 'C') {
      c[k-1] = 'c';
    } c[k-1] == 'C' c[k-1] c k-1 k 1 'C' {
      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 str = sc.next();
    char[] c = new char[n];

    for (int i = 0 ; i < n ; i++ ) {
      c[i] = str.charAt(i);
    }

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

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

    if (c[k-1] == 'C') {
      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 str = sc.next();
    char[] c = new char[n];

    for (int i = 0 ; i < n ; i++ ) {
      c[i] = str.charAt(i);
    }

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

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

    if (c[k-1] == 'C') {
      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 str = sc.next();
    char[] c = new char[n];

    for (int i = 0 ; i < n ; i++ ) {
      c[i] = str.charAt(i);
    }

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

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

    if (c[k-1] == 'C') {
      c[k-1] = 'c';
    }

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