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();
        StringBuilder answer = new StringBuilder();
        for (int i = 0; i < n; i++) {
            String a = String.valueOf(s.charAt(i));
            if ((i + 1) == k) {
                a = a.toLowerCase();
            }
            answer.append(a);
        }
        System.out.println(answer);
        sc.close();
    }
} 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();
        StringBuilder answer = new StringBuilder();
        for (int i = 0; i < n; i++) {
            String a = String.valueOf(s.charAt(i));
            if ((i + 1) == k) {
                a = a.toLowerCase();
            }
            answer.append(a);
        }
        System.out.println(answer);
        sc.close();
    }
} 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();
        StringBuilder answer = new StringBuilder();
        for (int i = 0; i < n; i++) {
            String a = String.valueOf(s.charAt(i));
            if ((i + 1) == k) {
                a = a.toLowerCase();
            }
            answer.append(a);
        }
        System.out.println(answer);
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int k = Integer.parseInt(sc.next());
        String s = sc.next();
        StringBuilder answer = new StringBuilder();
        for (int i = 0; i < n; i++) {
            String a = String.valueOf(s.charAt(i));
            if ((i + 1) == k) {
                a = a.toLowerCase();
            }
            answer.append(a);
        }
        System.out.println(answer);
        sc.close();
    } 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(); s sc.next() sc.next sc StringBuilder answer = new StringBuilder(); answer new StringBuilder() for (int i = 0; i < n; i++) {
            String a = String.valueOf(s.charAt(i));
            if ((i + 1) == k) {
                a = a.toLowerCase();
            }
            answer.append(a);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            String a = String.valueOf(s.charAt(i));
            if ((i + 1) == k) {
                a = a.toLowerCase();
            }
            answer.append(a);
        } {
            String a = String.valueOf(s.charAt(i));
            if ((i + 1) == k) {
                a = a.toLowerCase();
            }
            answer.append(a);
        } String a = String.valueOf(s.charAt(i)); a String.valueOf(s.charAt(i)) String.valueOf String s.charAt(i) s.charAt s i if ((i + 1) == k) {
                a = a.toLowerCase();
            } (i + 1) == k (i + 1) i 1 k {
                a = a.toLowerCase();
            } a = a.toLowerCase() a a.toLowerCase() a.toLowerCase a answer.append(a) answer.append answer a System.out.println(answer) System.out.println System.out System System.out answer sc.close() sc.close sc 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();
        StringBuilder answer = new StringBuilder();
        for (int i = 0; i < n; i++) {
            String a = String.valueOf(s.charAt(i));
            if ((i + 1) == k) {
                a = a.toLowerCase();
            }
            answer.append(a);
        }
        System.out.println(answer);
        sc.close();
    }
} 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();
        StringBuilder answer = new StringBuilder();
        for (int i = 0; i < n; i++) {
            String a = String.valueOf(s.charAt(i));
            if ((i + 1) == k) {
                a = a.toLowerCase();
            }
            answer.append(a);
        }
        System.out.println(answer);
        sc.close();
    }
} 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();
        StringBuilder answer = new StringBuilder();
        for (int i = 0; i < n; i++) {
            String a = String.valueOf(s.charAt(i));
            if ((i + 1) == k) {
                a = a.toLowerCase();
            }
            answer.append(a);
        }
        System.out.println(answer);
        sc.close();
    }
}