import java.util.Scanner;

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();
        String[] str = new String[n];
        str = s.split("");
        str[k - 1] = str[k - 1].toLowerCase();
        for (int i = 0; i < n; i++) {
            System.out.print(str[i]);
        }
    }
} import java.util.Scanner; Scanner 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();
        String[] str = new String[n];
        str = s.split("");
        str[k - 1] = str[k - 1].toLowerCase();
        for (int i = 0; i < n; i++) {
            System.out.print(str[i]);
        }
    }
} 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();
        String[] str = new String[n];
        str = s.split("");
        str[k - 1] = str[k - 1].toLowerCase();
        for (int i = 0; i < n; i++) {
            System.out.print(str[i]);
        }
    } main {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int k = sc.nextInt();
        String s = sc.next();
        String[] str = new String[n];
        str = s.split("");
        str[k - 1] = str[k - 1].toLowerCase();
        for (int i = 0; i < n; i++) {
            System.out.print(str[i]);
        }
    } 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 String[] str = new String[n]; str new String[n] n str = s.split("") str s.split("") s.split s "" 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 for (int i = 0; i < n; i++) {
            System.out.print(str[i]);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            System.out.print(str[i]);
        } {
            System.out.print(str[i]);
        } System.out.print(str[i]) System.out.print System.out System System.out str[i] str i 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();
        String[] str = new String[n];
        str = s.split("");
        str[k - 1] = str[k - 1].toLowerCase();
        for (int i = 0; i < n; i++) {
            System.out.print(str[i]);
        }
    }
} 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();
        String[] str = new String[n];
        str = s.split("");
        str[k - 1] = str[k - 1].toLowerCase();
        for (int i = 0; i < n; i++) {
            System.out.print(str[i]);
        }
    }
} Main
import java.util.Scanner;

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();
        String[] str = new String[n];
        str = s.split("");
        str[k - 1] = str[k - 1].toLowerCase();
        for (int i = 0; i < n; i++) {
            System.out.print(str[i]);
        }
    }
}