import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

  public static void main(String[] args) {

    new Main().run();
  }
  public void run() {

    try(BufferedReader in = new BufferedReader(new InputStreamReader(System.in))) {
      String[] lines = in.readLine().split(" ");
      // int n = Integer.parseInt(lines[0]);
      int k = Integer.parseInt(lines[1]);
      String s = in.readLine();

      char[] as =s.toCharArray();
      as[k-1] = Character.toLowerCase(as[k-1]);

      String ans = new String(as);
      System.out.println(ans);
    }
    catch(IOException e) {

      System.err.println(e);
    }
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

  public static void main(String[] args) {

    new Main().run();
  }
  public void run() {

    try(BufferedReader in = new BufferedReader(new InputStreamReader(System.in))) {
      String[] lines = in.readLine().split(" ");
      // int n = Integer.parseInt(lines[0]);
      int k = Integer.parseInt(lines[1]);
      String s = in.readLine();

      char[] as =s.toCharArray();
      as[k-1] = Character.toLowerCase(as[k-1]);

      String ans = new String(as);
      System.out.println(ans);
    }
    catch(IOException e) {

      System.err.println(e);
    }
  }
} Main public static void main(String[] args) {

    new Main().run();
  } main {

    new Main().run();
  } new Main().run() new Main().run new Main() String[] args args public void run() {

    try(BufferedReader in = new BufferedReader(new InputStreamReader(System.in))) {
      String[] lines = in.readLine().split(" ");
      // int n = Integer.parseInt(lines[0]);
      int k = Integer.parseInt(lines[1]);
      String s = in.readLine();

      char[] as =s.toCharArray();
      as[k-1] = Character.toLowerCase(as[k-1]);

      String ans = new String(as);
      System.out.println(ans);
    }
    catch(IOException e) {

      System.err.println(e);
    }
  } run {

    try(BufferedReader in = new BufferedReader(new InputStreamReader(System.in))) {
      String[] lines = in.readLine().split(" ");
      // int n = Integer.parseInt(lines[0]);
      int k = Integer.parseInt(lines[1]);
      String s = in.readLine();

      char[] as =s.toCharArray();
      as[k-1] = Character.toLowerCase(as[k-1]);

      String ans = new String(as);
      System.out.println(ans);
    }
    catch(IOException e) {

      System.err.println(e);
    }
  } try(BufferedReader in = new BufferedReader(new InputStreamReader(System.in))) {
      String[] lines = in.readLine().split(" ");
      // int n = Integer.parseInt(lines[0]);
      int k = Integer.parseInt(lines[1]);
      String s = in.readLine();

      char[] as =s.toCharArray();
      as[k-1] = Character.toLowerCase(as[k-1]);

      String ans = new String(as);
      System.out.println(ans);
    }
    catch(IOException e) {

      System.err.println(e);
    } catch(IOException e) {

      System.err.println(e);
    } IOException e {

      System.err.println(e);
    } System.err.println(e) System.err.println System.err System System.err e {
      String[] lines = in.readLine().split(" ");
      // int n = Integer.parseInt(lines[0]);
      int k = Integer.parseInt(lines[1]);
      String s = in.readLine();

      char[] as =s.toCharArray();
      as[k-1] = Character.toLowerCase(as[k-1]);

      String ans = new String(as);
      System.out.println(ans);
    } BufferedReader in = new BufferedReader(new InputStreamReader(System.in)) BufferedReader in = new BufferedReader(new InputStreamReader(System.in)) new BufferedReader(new InputStreamReader(System.in)) String[] lines = in.readLine().split(" "); lines in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " int k = Integer.parseInt(lines[1]); k Integer.parseInt(lines[1]) Integer.parseInt Integer lines[1] lines 1 String s = in.readLine(); s in.readLine() in.readLine in char[] as =s.toCharArray(); as s.toCharArray() s.toCharArray s as[k-1] = Character.toLowerCase(as[k-1]) as[k-1] as k-1 k 1 Character.toLowerCase(as[k-1]) Character.toLowerCase Character as[k-1] as k-1 k 1 String ans = new String(as); ans new String(as) System.out.println(ans) System.out.println System.out System System.out ans public class Main {

  public static void main(String[] args) {

    new Main().run();
  }
  public void run() {

    try(BufferedReader in = new BufferedReader(new InputStreamReader(System.in))) {
      String[] lines = in.readLine().split(" ");
      // int n = Integer.parseInt(lines[0]);
      int k = Integer.parseInt(lines[1]);
      String s = in.readLine();

      char[] as =s.toCharArray();
      as[k-1] = Character.toLowerCase(as[k-1]);

      String ans = new String(as);
      System.out.println(ans);
    }
    catch(IOException e) {

      System.err.println(e);
    }
  }
} public class Main {

  public static void main(String[] args) {

    new Main().run();
  }
  public void run() {

    try(BufferedReader in = new BufferedReader(new InputStreamReader(System.in))) {
      String[] lines = in.readLine().split(" ");
      // int n = Integer.parseInt(lines[0]);
      int k = Integer.parseInt(lines[1]);
      String s = in.readLine();

      char[] as =s.toCharArray();
      as[k-1] = Character.toLowerCase(as[k-1]);

      String ans = new String(as);
      System.out.println(ans);
    }
    catch(IOException e) {

      System.err.println(e);
    }
  }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

  public static void main(String[] args) {

    new Main().run();
  }
  public void run() {

    try(BufferedReader in = new BufferedReader(new InputStreamReader(System.in))) {
      String[] lines = in.readLine().split(" ");
      // int n = Integer.parseInt(lines[0]);
      int k = Integer.parseInt(lines[1]);
      String s = in.readLine();

      char[] as =s.toCharArray();
      as[k-1] = Character.toLowerCase(as[k-1]);

      String ans = new String(as);
      System.out.println(ans);
    }
    catch(IOException e) {

      System.err.println(e);
    }
  }
}