import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    int k = scan.nextInt();
    String s = scan.next();
    System.out.println(s.substring(0, k - 1) + s.substring(k - 1, k).toLowerCase() + s.substring(k));
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    int k = scan.nextInt();
    String s = scan.next();
    System.out.println(s.substring(0, k - 1) + s.substring(k - 1, k).toLowerCase() + s.substring(k));
  }
} Main public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    int k = scan.nextInt();
    String s = scan.next();
    System.out.println(s.substring(0, k - 1) + s.substring(k - 1, k).toLowerCase() + s.substring(k));
  } main {
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    int k = scan.nextInt();
    String s = scan.next();
    System.out.println(s.substring(0, k - 1) + s.substring(k - 1, k).toLowerCase() + s.substring(k));
  } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int k = scan.nextInt(); k scan.nextInt() scan.nextInt scan String s = scan.next(); s scan.next() scan.next scan System.out.println(s.substring(0, k - 1) + s.substring(k - 1, k).toLowerCase() + s.substring(k)) System.out.println System.out System System.out s.substring(0, k - 1) + s.substring(k - 1, k).toLowerCase() + s.substring(k) s.substring(0, k - 1) + s.substring(k - 1, k).toLowerCase() + s.substring(k) s.substring(0, k - 1) s.substring s 0 k - 1 k 1 s.substring(k - 1, k).toLowerCase() s.substring(k - 1, k).toLowerCase s.substring(k - 1, k) s.substring s k - 1 k 1 k s.substring(k) s.substring s k String[] args args public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    int k = scan.nextInt();
    String s = scan.next();
    System.out.println(s.substring(0, k - 1) + s.substring(k - 1, k).toLowerCase() + s.substring(k));
  }
} public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    int k = scan.nextInt();
    String s = scan.next();
    System.out.println(s.substring(0, k - 1) + s.substring(k - 1, k).toLowerCase() + s.substring(k));
  }
} Main
import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    int k = scan.nextInt();
    String s = scan.next();
    System.out.println(s.substring(0, k - 1) + s.substring(k - 1, k).toLowerCase() + s.substring(k));
  }
}