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();
    StringBuilder SS = new StringBuilder(S);
    String s = String.valueOf(S.charAt(K-1)).toLowerCase();
    System.out.println(SS.replace(K-1,K,s).toString());
  }
} 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();
    StringBuilder SS = new StringBuilder(S);
    String s = String.valueOf(S.charAt(K-1)).toLowerCase();
    System.out.println(SS.replace(K-1,K,s).toString());
  }
} 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();
    StringBuilder SS = new StringBuilder(S);
    String s = String.valueOf(S.charAt(K-1)).toLowerCase();
    System.out.println(SS.replace(K-1,K,s).toString());
  } main {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int K = sc.nextInt();
    String S = sc.next();
    StringBuilder SS = new StringBuilder(S);
    String s = String.valueOf(S.charAt(K-1)).toLowerCase();
    System.out.println(SS.replace(K-1,K,s).toString());
  } 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 StringBuilder SS = new StringBuilder(S); SS new StringBuilder(S) String s = String.valueOf(S.charAt(K-1)).toLowerCase(); s String.valueOf(S.charAt(K-1)).toLowerCase() String.valueOf(S.charAt(K-1)).toLowerCase String.valueOf(S.charAt(K-1)) String.valueOf String S.charAt(K-1) S.charAt S K-1 K 1 System.out.println(SS.replace(K-1,K,s).toString()) System.out.println System.out System System.out SS.replace(K-1,K,s).toString() SS.replace(K-1,K,s).toString SS.replace(K-1,K,s) SS.replace SS K-1 K 1 K s 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();
    StringBuilder SS = new StringBuilder(S);
    String s = String.valueOf(S.charAt(K-1)).toLowerCase();
    System.out.println(SS.replace(K-1,K,s).toString());
  }
} 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();
    StringBuilder SS = new StringBuilder(S);
    String s = String.valueOf(S.charAt(K-1)).toLowerCase();
    System.out.println(SS.replace(K-1,K,s).toString());
  }
} 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();
    StringBuilder SS = new StringBuilder(S);
    String s = String.valueOf(S.charAt(K-1)).toLowerCase();
    System.out.println(SS.replace(K-1,K,s).toString());
  }
}