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 sb = new StringBuilder();
        for (int i = 0; i < n; i++) {
            if (i == k - 1) {
                sb.appendCodePoint(s.charAt(i) + 32);
            } else {
                sb.append(s.charAt(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();
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < n; i++) {
            if (i == k - 1) {
                sb.appendCodePoint(s.charAt(i) + 32);
            } else {
                sb.append(s.charAt(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();
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < n; i++) {
            if (i == k - 1) {
                sb.appendCodePoint(s.charAt(i) + 32);
            } else {
                sb.append(s.charAt(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();
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < n; i++) {
            if (i == k - 1) {
                sb.appendCodePoint(s.charAt(i) + 32);
            } else {
                sb.append(s.charAt(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(); s sc.next() sc.next sc StringBuilder sb = new StringBuilder(); sb new StringBuilder() for (int i = 0; i < n; i++) {
            if (i == k - 1) {
                sb.appendCodePoint(s.charAt(i) + 32);
            } else {
                sb.append(s.charAt(i));
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            if (i == k - 1) {
                sb.appendCodePoint(s.charAt(i) + 32);
            } else {
                sb.append(s.charAt(i));
            }
        } {
            if (i == k - 1) {
                sb.appendCodePoint(s.charAt(i) + 32);
            } else {
                sb.append(s.charAt(i));
            }
        } if (i == k - 1) {
                sb.appendCodePoint(s.charAt(i) + 32);
            } else {
                sb.append(s.charAt(i));
            } i == k - 1 i k - 1 k 1 {
                sb.appendCodePoint(s.charAt(i) + 32);
            } sb.appendCodePoint(s.charAt(i) + 32) sb.appendCodePoint sb s.charAt(i) + 32 s.charAt(i) s.charAt s i 32 {
                sb.append(s.charAt(i));
            } sb.append(s.charAt(i)) sb.append sb s.charAt(i) s.charAt 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();
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < n; i++) {
            if (i == k - 1) {
                sb.appendCodePoint(s.charAt(i) + 32);
            } else {
                sb.append(s.charAt(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();
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < n; i++) {
            if (i == k - 1) {
                sb.appendCodePoint(s.charAt(i) + 32);
            } else {
                sb.append(s.charAt(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();
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < n; i++) {
            if (i == k - 1) {
                sb.appendCodePoint(s.charAt(i) + 32);
            } else {
                sb.append(s.charAt(i));
            }
        }

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