import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        String[] str = sc.next().split("");

        str[k-1] = str[k-1].toLowerCase();
        String result = "";
        for (String s : str) result += s;
      
        System.out.println(result);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        String[] str = sc.next().split("");

        str[k-1] = str[k-1].toLowerCase();
        String result = "";
        for (String s : str) result += s;
      
        System.out.println(result);
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        String[] str = sc.next().split("");

        str[k-1] = str[k-1].toLowerCase();
        String result = "";
        for (String s : str) result += s;
      
        System.out.println(result);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        String[] str = sc.next().split("");

        str[k-1] = str[k-1].toLowerCase();
        String result = "";
        for (String s : str) result += s;
      
        System.out.println(result);
    } 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[] str = sc.next().split(""); str sc.next().split("") sc.next().split sc.next() sc.next sc "" str[k-1] = str[k-1].toLowerCase() str[k-1] str k-1 k 1 str[k-1].toLowerCase() str[k-1].toLowerCase str[k-1] str k-1 k 1 String result = ""; result "" for (String s : str) result += s; String s str result += s; result += s result s System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        String[] str = sc.next().split("");

        str[k-1] = str[k-1].toLowerCase();
        String result = "";
        for (String s : str) result += s;
      
        System.out.println(result);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        String[] str = sc.next().split("");

        str[k-1] = str[k-1].toLowerCase();
        String result = "";
        for (String s : str) result += s;
      
        System.out.println(result);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        String[] str = sc.next().split("");

        str[k-1] = str[k-1].toLowerCase();
        String result = "";
        for (String s : str) result += s;
      
        System.out.println(result);
    }
}
