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();

    char[] c = s.toCharArray();
    char target = c[k - 1];
    char replaced = Character.toLowerCase(target);

    StringBuilder sb = new StringBuilder(s);
    sb.setCharAt(k - 1, replaced);

    System.out.println(sb);
    
  }
} 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();

    char[] c = s.toCharArray();
    char target = c[k - 1];
    char replaced = Character.toLowerCase(target);

    StringBuilder sb = new StringBuilder(s);
    sb.setCharAt(k - 1, replaced);

    System.out.println(sb);
    
  }
} 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();

    char[] c = s.toCharArray();
    char target = c[k - 1];
    char replaced = Character.toLowerCase(target);

    StringBuilder sb = new StringBuilder(s);
    sb.setCharAt(k - 1, replaced);

    System.out.println(sb);
    
  } main {
    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();
    int k = sc.nextInt();
    String s = sc.next();

    char[] c = s.toCharArray();
    char target = c[k - 1];
    char replaced = Character.toLowerCase(target);

    StringBuilder sb = new StringBuilder(s);
    sb.setCharAt(k - 1, replaced);

    System.out.println(sb);
    
  } 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 char[] c = s.toCharArray(); c s.toCharArray() s.toCharArray s char target = c[k - 1]; target c[k - 1] c k - 1 k 1 char replaced = Character.toLowerCase(target); replaced Character.toLowerCase(target) Character.toLowerCase Character target StringBuilder sb = new StringBuilder(s); sb new StringBuilder(s) sb.setCharAt(k - 1, replaced) sb.setCharAt sb k - 1 k 1 replaced 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 sc = new Scanner(System.in);

    int n = sc.nextInt();
    int k = sc.nextInt();
    String s = sc.next();

    char[] c = s.toCharArray();
    char target = c[k - 1];
    char replaced = Character.toLowerCase(target);

    StringBuilder sb = new StringBuilder(s);
    sb.setCharAt(k - 1, replaced);

    System.out.println(sb);
    
  }
} 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();

    char[] c = s.toCharArray();
    char target = c[k - 1];
    char replaced = Character.toLowerCase(target);

    StringBuilder sb = new StringBuilder(s);
    sb.setCharAt(k - 1, replaced);

    System.out.println(sb);
    
  }
} 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();

    char[] c = s.toCharArray();
    char target = c[k - 1];
    char replaced = Character.toLowerCase(target);

    StringBuilder sb = new StringBuilder(s);
    sb.setCharAt(k - 1, replaced);

    System.out.println(sb);
    
  }
}