import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int n = scanner.nextInt();
        int k = scanner.nextInt();
        String s = scanner.next();

        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < n; i++) {
            char c = s.charAt(i);
            if (i == k - 1) {
                sb.append(String.valueOf(c).toLowerCase());
            } else {
                sb.append(c);
            }
        }
        System.out.println(sb.toString());
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int n = scanner.nextInt();
        int k = scanner.nextInt();
        String s = scanner.next();

        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < n; i++) {
            char c = s.charAt(i);
            if (i == k - 1) {
                sb.append(String.valueOf(c).toLowerCase());
            } else {
                sb.append(c);
            }
        }
        System.out.println(sb.toString());
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int n = scanner.nextInt();
        int k = scanner.nextInt();
        String s = scanner.next();

        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < n; i++) {
            char c = s.charAt(i);
            if (i == k - 1) {
                sb.append(String.valueOf(c).toLowerCase());
            } else {
                sb.append(c);
            }
        }
        System.out.println(sb.toString());
    } main {
        Scanner scanner = new Scanner(System.in);

        int n = scanner.nextInt();
        int k = scanner.nextInt();
        String s = scanner.next();

        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < n; i++) {
            char c = s.charAt(i);
            if (i == k - 1) {
                sb.append(String.valueOf(c).toLowerCase());
            } else {
                sb.append(c);
            }
        }
        System.out.println(sb.toString());
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner int k = scanner.nextInt(); k scanner.nextInt() scanner.nextInt scanner String s = scanner.next(); s scanner.next() scanner.next scanner StringBuilder sb = new StringBuilder(); sb new StringBuilder() for (int i = 0; i < n; i++) {
            char c = s.charAt(i);
            if (i == k - 1) {
                sb.append(String.valueOf(c).toLowerCase());
            } else {
                sb.append(c);
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            char c = s.charAt(i);
            if (i == k - 1) {
                sb.append(String.valueOf(c).toLowerCase());
            } else {
                sb.append(c);
            }
        } {
            char c = s.charAt(i);
            if (i == k - 1) {
                sb.append(String.valueOf(c).toLowerCase());
            } else {
                sb.append(c);
            }
        } char c = s.charAt(i); c s.charAt(i) s.charAt s i if (i == k - 1) {
                sb.append(String.valueOf(c).toLowerCase());
            } else {
                sb.append(c);
            } i == k - 1 i k - 1 k 1 {
                sb.append(String.valueOf(c).toLowerCase());
            } sb.append(String.valueOf(c).toLowerCase()) sb.append sb String.valueOf(c).toLowerCase() String.valueOf(c).toLowerCase String.valueOf(c) String.valueOf String c {
                sb.append(c);
            } sb.append(c) sb.append sb c 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 scanner = new Scanner(System.in);

        int n = scanner.nextInt();
        int k = scanner.nextInt();
        String s = scanner.next();

        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < n; i++) {
            char c = s.charAt(i);
            if (i == k - 1) {
                sb.append(String.valueOf(c).toLowerCase());
            } else {
                sb.append(c);
            }
        }
        System.out.println(sb.toString());
    }
} public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int n = scanner.nextInt();
        int k = scanner.nextInt();
        String s = scanner.next();

        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < n; i++) {
            char c = s.charAt(i);
            if (i == k - 1) {
                sb.append(String.valueOf(c).toLowerCase());
            } else {
                sb.append(c);
            }
        }
        System.out.println(sb.toString());
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int n = scanner.nextInt();
        int k = scanner.nextInt();
        String s = scanner.next();

        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < n; i++) {
            char c = s.charAt(i);
            if (i == k - 1) {
                sb.append(String.valueOf(c).toLowerCase());
            } else {
                sb.append(c);
            }
        }
        System.out.println(sb.toString());
    }
}