import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        ABC126_a solver = new ABC126_a();
        solver.solve(1, in, out);
        out.close();
    }

    static class ABC126_a {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int K = in.nextInt();
            String S = in.next();

            char low = S.charAt(K - 1);
            String s = String.valueOf(low).toLowerCase();
            for (int i = 0; i < S.length(); i++) {
                if (i == K - 1) {
                    out.print(s);
                } else {
                    out.print(S.charAt(i));
                }
            }
        }

    }
}
 import java.io.OutputStream; OutputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        ABC126_a solver = new ABC126_a();
        solver.solve(1, in, out);
        out.close();
    }

    static class ABC126_a {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int K = in.nextInt();
            String S = in.next();

            char low = S.charAt(K - 1);
            String s = String.valueOf(low).toLowerCase();
            for (int i = 0; i < S.length(); i++) {
                if (i == K - 1) {
                    out.print(s);
                } else {
                    out.print(S.charAt(i));
                }
            }
        }

    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        ABC126_a solver = new ABC126_a();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        ABC126_a solver = new ABC126_a();
        solver.solve(1, in, out);
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out Scanner in = new Scanner(inputStream); in new Scanner(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) ABC126_a solver = new ABC126_a(); solver new ABC126_a() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class ABC126_a {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int K = in.nextInt();
            String S = in.next();

            char low = S.charAt(K - 1);
            String s = String.valueOf(low).toLowerCase();
            for (int i = 0; i < S.length(); i++) {
                if (i == K - 1) {
                    out.print(s);
                } else {
                    out.print(S.charAt(i));
                }
            }
        }

    } ABC126_a public void solve(int testNumber, Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int K = in.nextInt();
            String S = in.next();

            char low = S.charAt(K - 1);
            String s = String.valueOf(low).toLowerCase();
            for (int i = 0; i < S.length(); i++) {
                if (i == K - 1) {
                    out.print(s);
                } else {
                    out.print(S.charAt(i));
                }
            }
        } solve {
            int N = in.nextInt();
            int K = in.nextInt();
            String S = in.next();

            char low = S.charAt(K - 1);
            String s = String.valueOf(low).toLowerCase();
            for (int i = 0; i < S.length(); i++) {
                if (i == K - 1) {
                    out.print(s);
                } else {
                    out.print(S.charAt(i));
                }
            }
        } int N = in.nextInt(); N in.nextInt() in.nextInt in int K = in.nextInt(); K in.nextInt() in.nextInt in String S = in.next(); S in.next() in.next in char low = S.charAt(K - 1); low S.charAt(K - 1) S.charAt S K - 1 K 1 String s = String.valueOf(low).toLowerCase(); s String.valueOf(low).toLowerCase() String.valueOf(low).toLowerCase String.valueOf(low) String.valueOf String low for (int i = 0; i < S.length(); i++) {
                if (i == K - 1) {
                    out.print(s);
                } else {
                    out.print(S.charAt(i));
                }
            } int i = 0; int i = 0; i 0 i < S.length() i S.length() S.length S i++ i++ i {
                if (i == K - 1) {
                    out.print(s);
                } else {
                    out.print(S.charAt(i));
                }
            } {
                if (i == K - 1) {
                    out.print(s);
                } else {
                    out.print(S.charAt(i));
                }
            } if (i == K - 1) {
                    out.print(s);
                } else {
                    out.print(S.charAt(i));
                } i == K - 1 i K - 1 K 1 {
                    out.print(s);
                } out.print(s) out.print out s {
                    out.print(S.charAt(i));
                } out.print(S.charAt(i)) out.print out S.charAt(i) S.charAt S i int testNumber testNumber Scanner in in PrintWriter out out public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        ABC126_a solver = new ABC126_a();
        solver.solve(1, in, out);
        out.close();
    }

    static class ABC126_a {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int K = in.nextInt();
            String S = in.next();

            char low = S.charAt(K - 1);
            String s = String.valueOf(low).toLowerCase();
            for (int i = 0; i < S.length(); i++) {
                if (i == K - 1) {
                    out.print(s);
                } else {
                    out.print(S.charAt(i));
                }
            }
        }

    }
} public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        ABC126_a solver = new ABC126_a();
        solver.solve(1, in, out);
        out.close();
    }

    static class ABC126_a {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int K = in.nextInt();
            String S = in.next();

            char low = S.charAt(K - 1);
            String s = String.valueOf(low).toLowerCase();
            for (int i = 0; i < S.length(); i++) {
                if (i == K - 1) {
                    out.print(s);
                } else {
                    out.print(S.charAt(i));
                }
            }
        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        ABC126_a solver = new ABC126_a();
        solver.solve(1, in, out);
        out.close();
    }

    static class ABC126_a {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int K = in.nextInt();
            String S = in.next();

            char low = S.charAt(K - 1);
            String s = String.valueOf(low).toLowerCase();
            for (int i = 0; i < S.length(); i++) {
                if (i == K - 1) {
                    out.print(s);
                } else {
                    out.print(S.charAt(i));
                }
            }
        }

    }
}

