import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        String S = sc.next();
        sc.close();

        StringBuilder sb = new StringBuilder();

        for (int i = 0; i < N; i++) {
            char s = S.charAt(i);
            if (i == K - 1) {
                switch (String.valueOf(s)) {
                    case "A":
                        sb.append("a");
                        break;
                    case "B":
                        sb.append("b");
                        break;
                    case "C":
                        sb.append("c");
                        break;
                    default:
                        continue;
                }
            } else {
                sb.append(String.valueOf(s));
            }
        }

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

    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        String S = sc.next();
        sc.close();

        StringBuilder sb = new StringBuilder();

        for (int i = 0; i < N; i++) {
            char s = S.charAt(i);
            if (i == K - 1) {
                switch (String.valueOf(s)) {
                    case "A":
                        sb.append("a");
                        break;
                    case "B":
                        sb.append("b");
                        break;
                    case "C":
                        sb.append("c");
                        break;
                    default:
                        continue;
                }
            } else {
                sb.append(String.valueOf(s));
            }
        }

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

    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        String S = sc.next();
        sc.close();

        StringBuilder sb = new StringBuilder();

        for (int i = 0; i < N; i++) {
            char s = S.charAt(i);
            if (i == K - 1) {
                switch (String.valueOf(s)) {
                    case "A":
                        sb.append("a");
                        break;
                    case "B":
                        sb.append("b");
                        break;
                    case "C":
                        sb.append("c");
                        break;
                    default:
                        continue;
                }
            } else {
                sb.append(String.valueOf(s));
            }
        }

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

    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        String S = sc.next();
        sc.close();

        StringBuilder sb = new StringBuilder();

        for (int i = 0; i < N; i++) {
            char s = S.charAt(i);
            if (i == K - 1) {
                switch (String.valueOf(s)) {
                    case "A":
                        sb.append("a");
                        break;
                    case "B":
                        sb.append("b");
                        break;
                    case "C":
                        sb.append("c");
                        break;
                    default:
                        continue;
                }
            } else {
                sb.append(String.valueOf(s));
            }
        }

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

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int K = sc.nextInt(); K sc.nextInt() sc.nextInt sc String S = sc.next(); S sc.next() sc.next sc sc.close() sc.close sc StringBuilder sb = new StringBuilder(); sb new StringBuilder() for (int i = 0; i < N; i++) {
            char s = S.charAt(i);
            if (i == K - 1) {
                switch (String.valueOf(s)) {
                    case "A":
                        sb.append("a");
                        break;
                    case "B":
                        sb.append("b");
                        break;
                    case "C":
                        sb.append("c");
                        break;
                    default:
                        continue;
                }
            } else {
                sb.append(String.valueOf(s));
            }
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            char s = S.charAt(i);
            if (i == K - 1) {
                switch (String.valueOf(s)) {
                    case "A":
                        sb.append("a");
                        break;
                    case "B":
                        sb.append("b");
                        break;
                    case "C":
                        sb.append("c");
                        break;
                    default:
                        continue;
                }
            } else {
                sb.append(String.valueOf(s));
            }
        } {
            char s = S.charAt(i);
            if (i == K - 1) {
                switch (String.valueOf(s)) {
                    case "A":
                        sb.append("a");
                        break;
                    case "B":
                        sb.append("b");
                        break;
                    case "C":
                        sb.append("c");
                        break;
                    default:
                        continue;
                }
            } else {
                sb.append(String.valueOf(s));
            }
        } char s = S.charAt(i); s S.charAt(i) S.charAt S i if (i == K - 1) {
                switch (String.valueOf(s)) {
                    case "A":
                        sb.append("a");
                        break;
                    case "B":
                        sb.append("b");
                        break;
                    case "C":
                        sb.append("c");
                        break;
                    default:
                        continue;
                }
            } else {
                sb.append(String.valueOf(s));
            } i == K - 1 i K - 1 K 1 {
                switch (String.valueOf(s)) {
                    case "A":
                        sb.append("a");
                        break;
                    case "B":
                        sb.append("b");
                        break;
                    case "C":
                        sb.append("c");
                        break;
                    default:
                        continue;
                }
            } switch (String.valueOf(s)) {
                    case "A":
                        sb.append("a");
                        break;
                    case "B":
                        sb.append("b");
                        break;
                    case "C":
                        sb.append("c");
                        break;
                    default:
                        continue;
                } String.valueOf(s) String.valueOf String s case "A": "A" case "A": sb.append("a") sb.append sb "a" break; case "B": "B" case "B": sb.append("b") sb.append sb "b" break; case "C": "C" case "C": sb.append("c") sb.append sb "c" break; default: default: continue; {
                sb.append(String.valueOf(s));
            } sb.append(String.valueOf(s)) sb.append sb String.valueOf(s) String.valueOf String s 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 = sc.nextInt();
        int K = sc.nextInt();
        String S = sc.next();
        sc.close();

        StringBuilder sb = new StringBuilder();

        for (int i = 0; i < N; i++) {
            char s = S.charAt(i);
            if (i == K - 1) {
                switch (String.valueOf(s)) {
                    case "A":
                        sb.append("a");
                        break;
                    case "B":
                        sb.append("b");
                        break;
                    case "C":
                        sb.append("c");
                        break;
                    default:
                        continue;
                }
            } else {
                sb.append(String.valueOf(s));
            }
        }

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

    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        String S = sc.next();
        sc.close();

        StringBuilder sb = new StringBuilder();

        for (int i = 0; i < N; i++) {
            char s = S.charAt(i);
            if (i == K - 1) {
                switch (String.valueOf(s)) {
                    case "A":
                        sb.append("a");
                        break;
                    case "B":
                        sb.append("b");
                        break;
                    case "C":
                        sb.append("c");
                        break;
                    default:
                        continue;
                }
            } else {
                sb.append(String.valueOf(s));
            }
        }

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

    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        String S = sc.next();
        sc.close();

        StringBuilder sb = new StringBuilder();

        for (int i = 0; i < N; i++) {
            char s = S.charAt(i);
            if (i == K - 1) {
                switch (String.valueOf(s)) {
                    case "A":
                        sb.append("a");
                        break;
                    case "B":
                        sb.append("b");
                        break;
                    case "C":
                        sb.append("c");
                        break;
                    default:
                        continue;
                }
            } else {
                sb.append(String.valueOf(s));
            }
        }

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

    }
}
