import java.util.Scanner;

public class Main {

    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int k = Integer.parseInt(sc.next());
        String[] s = sc.next().split("");

        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < s.length; i++) {
            if (i == k - 1) {
                sb.append(s[i].toLowerCase());
            } else {
                sb.append(s[i]);
            }
        }

        System.out.println(sb.toString());
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int k = Integer.parseInt(sc.next());
        String[] s = sc.next().split("");

        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < s.length; i++) {
            if (i == k - 1) {
                sb.append(s[i].toLowerCase());
            } else {
                sb.append(s[i]);
            }
        }

        System.out.println(sb.toString());
    }
} Main public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int k = Integer.parseInt(sc.next());
        String[] s = sc.next().split("");

        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < s.length; i++) {
            if (i == k - 1) {
                sb.append(s[i].toLowerCase());
            } else {
                sb.append(s[i]);
            }
        }

        System.out.println(sb.toString());
    } main {

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int k = Integer.parseInt(sc.next());
        String[] s = sc.next().split("");

        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < s.length; i++) {
            if (i == k - 1) {
                sb.append(s[i].toLowerCase());
            } else {
                sb.append(s[i]);
            }
        }

        System.out.println(sb.toString());
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int k = Integer.parseInt(sc.next()); k Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc String[] s = sc.next().split(""); s sc.next().split("") sc.next().split sc.next() sc.next sc "" StringBuilder sb = new StringBuilder(); sb new StringBuilder() for (int i = 0; i < s.length; i++) {
            if (i == k - 1) {
                sb.append(s[i].toLowerCase());
            } else {
                sb.append(s[i]);
            }
        } int i = 0; int i = 0; i 0 i < s.length i s.length s s.length i++ i++ i {
            if (i == k - 1) {
                sb.append(s[i].toLowerCase());
            } else {
                sb.append(s[i]);
            }
        } {
            if (i == k - 1) {
                sb.append(s[i].toLowerCase());
            } else {
                sb.append(s[i]);
            }
        } if (i == k - 1) {
                sb.append(s[i].toLowerCase());
            } else {
                sb.append(s[i]);
            } i == k - 1 i k - 1 k 1 {
                sb.append(s[i].toLowerCase());
            } sb.append(s[i].toLowerCase()) sb.append sb s[i].toLowerCase() s[i].toLowerCase s[i] s i {
                sb.append(s[i]);
            } sb.append(s[i]) sb.append sb s[i] s i System.out.println(sb.toString()) System.out.println System.out System System.out sb.toString() sb.toString sb String args[] args public class Main {

    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int k = Integer.parseInt(sc.next());
        String[] s = sc.next().split("");

        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < s.length; i++) {
            if (i == k - 1) {
                sb.append(s[i].toLowerCase());
            } else {
                sb.append(s[i]);
            }
        }

        System.out.println(sb.toString());
    }
} public class Main {

    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int k = Integer.parseInt(sc.next());
        String[] s = sc.next().split("");

        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < s.length; i++) {
            if (i == k - 1) {
                sb.append(s[i].toLowerCase());
            } else {
                sb.append(s[i]);
            }
        }

        System.out.println(sb.toString());
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int k = Integer.parseInt(sc.next());
        String[] s = sc.next().split("");

        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < s.length; i++) {
            if (i == k - 1) {
                sb.append(s[i].toLowerCase());
            } else {
                sb.append(s[i]);
            }
        }

        System.out.println(sb.toString());
    }
}