import java.util.*;
 
public class Main{
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String nk = scanner.nextLine();
    String s = scanner.nextLine();
    int toLowerCaseIdx = Integer.parseInt(nk.split(" ")[1]);
    StringBuilder sb = new StringBuilder(s);
    sb.replace(toLowerCaseIdx-1,toLowerCaseIdx,s.substring(toLowerCaseIdx-1,toLowerCaseIdx).toLowerCase());
    System.out.println(sb);
  }
} import java.util.*; util.* java public class Main{
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String nk = scanner.nextLine();
    String s = scanner.nextLine();
    int toLowerCaseIdx = Integer.parseInt(nk.split(" ")[1]);
    StringBuilder sb = new StringBuilder(s);
    sb.replace(toLowerCaseIdx-1,toLowerCaseIdx,s.substring(toLowerCaseIdx-1,toLowerCaseIdx).toLowerCase());
    System.out.println(sb);
  }
} Main public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String nk = scanner.nextLine();
    String s = scanner.nextLine();
    int toLowerCaseIdx = Integer.parseInt(nk.split(" ")[1]);
    StringBuilder sb = new StringBuilder(s);
    sb.replace(toLowerCaseIdx-1,toLowerCaseIdx,s.substring(toLowerCaseIdx-1,toLowerCaseIdx).toLowerCase());
    System.out.println(sb);
  } main {
    Scanner scanner = new Scanner(System.in);
    String nk = scanner.nextLine();
    String s = scanner.nextLine();
    int toLowerCaseIdx = Integer.parseInt(nk.split(" ")[1]);
    StringBuilder sb = new StringBuilder(s);
    sb.replace(toLowerCaseIdx-1,toLowerCaseIdx,s.substring(toLowerCaseIdx-1,toLowerCaseIdx).toLowerCase());
    System.out.println(sb);
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String nk = scanner.nextLine(); nk scanner.nextLine() scanner.nextLine scanner String s = scanner.nextLine(); s scanner.nextLine() scanner.nextLine scanner int toLowerCaseIdx = Integer.parseInt(nk.split(" ")[1]); toLowerCaseIdx Integer.parseInt(nk.split(" ")[1]) Integer.parseInt Integer nk.split(" ")[1] nk.split(" ") nk.split nk " " 1 StringBuilder sb = new StringBuilder(s); sb new StringBuilder(s) sb.replace(toLowerCaseIdx-1,toLowerCaseIdx,s.substring(toLowerCaseIdx-1,toLowerCaseIdx).toLowerCase()) sb.replace sb toLowerCaseIdx-1 toLowerCaseIdx 1 toLowerCaseIdx s.substring(toLowerCaseIdx-1,toLowerCaseIdx).toLowerCase() s.substring(toLowerCaseIdx-1,toLowerCaseIdx).toLowerCase s.substring(toLowerCaseIdx-1,toLowerCaseIdx) s.substring s toLowerCaseIdx-1 toLowerCaseIdx 1 toLowerCaseIdx System.out.println(sb) System.out.println System.out System System.out sb String[] args args public class Main{
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String nk = scanner.nextLine();
    String s = scanner.nextLine();
    int toLowerCaseIdx = Integer.parseInt(nk.split(" ")[1]);
    StringBuilder sb = new StringBuilder(s);
    sb.replace(toLowerCaseIdx-1,toLowerCaseIdx,s.substring(toLowerCaseIdx-1,toLowerCaseIdx).toLowerCase());
    System.out.println(sb);
  }
} public class Main{
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String nk = scanner.nextLine();
    String s = scanner.nextLine();
    int toLowerCaseIdx = Integer.parseInt(nk.split(" ")[1]);
    StringBuilder sb = new StringBuilder(s);
    sb.replace(toLowerCaseIdx-1,toLowerCaseIdx,s.substring(toLowerCaseIdx-1,toLowerCaseIdx).toLowerCase());
    System.out.println(sb);
  }
} Main
import java.util.*;
 
public class Main{
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String nk = scanner.nextLine();
    String s = scanner.nextLine();
    int toLowerCaseIdx = Integer.parseInt(nk.split(" ")[1]);
    StringBuilder sb = new StringBuilder(s);
    sb.replace(toLowerCaseIdx-1,toLowerCaseIdx,s.substring(toLowerCaseIdx-1,toLowerCaseIdx).toLowerCase());
    System.out.println(sb);
  }
}