import java.util.Scanner;
import java.util.List;
import java.util.ArrayList;
import java.util.Objects;
import java.lang.StringBuilder;

public class Main {
  public static void main(String[] args ){

    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();
    int K = sc.nextInt();

    StringBuilder S = new StringBuilder(sc.next());

    char lower = Character.toLowerCase(S.charAt(K - 1));
    S.setCharAt(K - 1, lower);
    System.out.println(S.toString());
  }
} import java.util.Scanner; Scanner java.util import java.util.List; List java.util import java.util.ArrayList; ArrayList java.util import java.util.Objects; Objects java.util import java.lang.StringBuilder; StringBuilder java.lang public class Main {
  public static void main(String[] args ){

    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();
    int K = sc.nextInt();

    StringBuilder S = new StringBuilder(sc.next());

    char lower = Character.toLowerCase(S.charAt(K - 1));
    S.setCharAt(K - 1, lower);
    System.out.println(S.toString());
  }
} Main public static void main(String[] args ){

    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();
    int K = sc.nextInt();

    StringBuilder S = new StringBuilder(sc.next());

    char lower = Character.toLowerCase(S.charAt(K - 1));
    S.setCharAt(K - 1, lower);
    System.out.println(S.toString());
  } main {

    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();
    int K = sc.nextInt();

    StringBuilder S = new StringBuilder(sc.next());

    char lower = Character.toLowerCase(S.charAt(K - 1));
    S.setCharAt(K - 1, lower);
    System.out.println(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 StringBuilder S = new StringBuilder(sc.next()); S new StringBuilder(sc.next()) char lower = Character.toLowerCase(S.charAt(K - 1)); lower Character.toLowerCase(S.charAt(K - 1)) Character.toLowerCase Character S.charAt(K - 1) S.charAt S K - 1 K 1 S.setCharAt(K - 1, lower) S.setCharAt S K - 1 K 1 lower System.out.println(S.toString()) System.out.println System.out System System.out S.toString() S.toString 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();

    StringBuilder S = new StringBuilder(sc.next());

    char lower = Character.toLowerCase(S.charAt(K - 1));
    S.setCharAt(K - 1, lower);
    System.out.println(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();

    StringBuilder S = new StringBuilder(sc.next());

    char lower = Character.toLowerCase(S.charAt(K - 1));
    S.setCharAt(K - 1, lower);
    System.out.println(S.toString());
  }
} Main
import java.util.Scanner;
import java.util.List;
import java.util.ArrayList;
import java.util.Objects;
import java.lang.StringBuilder;

public class Main {
  public static void main(String[] args ){

    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();
    int K = sc.nextInt();

    StringBuilder S = new StringBuilder(sc.next());

    char lower = Character.toLowerCase(S.charAt(K - 1));
    S.setCharAt(K - 1, lower);
    System.out.println(S.toString());
  }
}
