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();
    String s1[] = s.split("");
    s1[k-1] = s1[k-1].toLowerCase();
    for (int i = 0; i < n; i++){
      System.out.print(s1[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();
    String s1[] = s.split("");
    s1[k-1] = s1[k-1].toLowerCase();
    for (int i = 0; i < n; i++){
      System.out.print(s1[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();
    String s1[] = s.split("");
    s1[k-1] = s1[k-1].toLowerCase();
    for (int i = 0; i < n; i++){
      System.out.print(s1[i]);
    }
  } main {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int k = sc.nextInt();
    String s = sc.next();
    String s1[] = s.split("");
    s1[k-1] = s1[k-1].toLowerCase();
    for (int i = 0; i < n; i++){
      System.out.print(s1[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 String s1[] = s.split(""); s1 s.split("") s.split s "" s1[k-1] = s1[k-1].toLowerCase() s1[k-1] s1 k-1 k 1 s1[k-1].toLowerCase() s1[k-1].toLowerCase s1[k-1] s1 k-1 k 1 for (int i = 0; i < n; i++){
      System.out.print(s1[i]);
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      System.out.print(s1[i]);
    } {
      System.out.print(s1[i]);
    } System.out.print(s1[i]) System.out.print System.out System System.out s1[i] s1 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();
    String s1[] = s.split("");
    s1[k-1] = s1[k-1].toLowerCase();
    for (int i = 0; i < n; i++){
      System.out.print(s1[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();
    String s1[] = s.split("");
    s1[k-1] = s1[k-1].toLowerCase();
    for (int i = 0; i < n; i++){
      System.out.print(s1[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();
    String s1[] = s.split("");
    s1[k-1] = s1[k-1].toLowerCase();
    for (int i = 0; i < n; i++){
      System.out.print(s1[i]);
    }
  }
}
