import java.util.*;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n=sc.nextInt();
    int k=sc.nextInt()-1;
    StringBuilder sb = new StringBuilder(sc.next());
    sb.setCharAt(k,(char)(sb.charAt(k)+32));
    System.out.println(sb.toString());
  }
} import java.util.*; util.* java class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n=sc.nextInt();
    int k=sc.nextInt()-1;
    StringBuilder sb = new StringBuilder(sc.next());
    sb.setCharAt(k,(char)(sb.charAt(k)+32));
    System.out.println(sb.toString());
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n=sc.nextInt();
    int k=sc.nextInt()-1;
    StringBuilder sb = new StringBuilder(sc.next());
    sb.setCharAt(k,(char)(sb.charAt(k)+32));
    System.out.println(sb.toString());
  } main {
    Scanner sc = new Scanner(System.in);
    int n=sc.nextInt();
    int k=sc.nextInt()-1;
    StringBuilder sb = new StringBuilder(sc.next());
    sb.setCharAt(k,(char)(sb.charAt(k)+32));
    System.out.println(sb.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()-1; k sc.nextInt()-1 sc.nextInt() sc.nextInt sc 1 StringBuilder sb = new StringBuilder(sc.next()); sb new StringBuilder(sc.next()) sb.setCharAt(k,(char)(sb.charAt(k)+32)) sb.setCharAt sb k (char)(sb.charAt(k)+32) sb.charAt(k) sb.charAt sb k 32 System.out.println(sb.toString()) System.out.println System.out System System.out sb.toString() sb.toString sb String[] args args
import java.util.*;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n=sc.nextInt();
    int k=sc.nextInt()-1;
    StringBuilder sb = new StringBuilder(sc.next());
    sb.setCharAt(k,(char)(sb.charAt(k)+32));
    System.out.println(sb.toString());
  }
}