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();
        char[] cL = new char[n];
        for (int i = 0;i<n; i++) {
            char c = s.charAt(i);
            if (i+1 == k) {
                if (c == 'A') cL[i] = 'a';
                if (c == 'B') cL[i] = 'b';
                if (c == 'C') cL[i] = 'c';
            } else {
                cL[i] = c;
            }
        }
        for (char c : cL) {
            System.out.print(c);
        }
    }
} 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();
        char[] cL = new char[n];
        for (int i = 0;i<n; i++) {
            char c = s.charAt(i);
            if (i+1 == k) {
                if (c == 'A') cL[i] = 'a';
                if (c == 'B') cL[i] = 'b';
                if (c == 'C') cL[i] = 'c';
            } else {
                cL[i] = c;
            }
        }
        for (char c : cL) {
            System.out.print(c);
        }
    }
} 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();
        char[] cL = new char[n];
        for (int i = 0;i<n; i++) {
            char c = s.charAt(i);
            if (i+1 == k) {
                if (c == 'A') cL[i] = 'a';
                if (c == 'B') cL[i] = 'b';
                if (c == 'C') cL[i] = 'c';
            } else {
                cL[i] = c;
            }
        }
        for (char c : cL) {
            System.out.print(c);
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        String s = sc.next();
        char[] cL = new char[n];
        for (int i = 0;i<n; i++) {
            char c = s.charAt(i);
            if (i+1 == k) {
                if (c == 'A') cL[i] = 'a';
                if (c == 'B') cL[i] = 'b';
                if (c == 'C') cL[i] = 'c';
            } else {
                cL[i] = c;
            }
        }
        for (char c : cL) {
            System.out.print(c);
        }
    } 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 char[] cL = new char[n]; cL new char[n] n for (int i = 0;i<n; i++) {
            char c = s.charAt(i);
            if (i+1 == k) {
                if (c == 'A') cL[i] = 'a';
                if (c == 'B') cL[i] = 'b';
                if (c == 'C') cL[i] = 'c';
            } else {
                cL[i] = c;
            }
        } int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
            char c = s.charAt(i);
            if (i+1 == k) {
                if (c == 'A') cL[i] = 'a';
                if (c == 'B') cL[i] = 'b';
                if (c == 'C') cL[i] = 'c';
            } else {
                cL[i] = c;
            }
        } {
            char c = s.charAt(i);
            if (i+1 == k) {
                if (c == 'A') cL[i] = 'a';
                if (c == 'B') cL[i] = 'b';
                if (c == 'C') cL[i] = 'c';
            } else {
                cL[i] = c;
            }
        } char c = s.charAt(i); c s.charAt(i) s.charAt s i if (i+1 == k) {
                if (c == 'A') cL[i] = 'a';
                if (c == 'B') cL[i] = 'b';
                if (c == 'C') cL[i] = 'c';
            } else {
                cL[i] = c;
            } i+1 == k i+1 i 1 k {
                if (c == 'A') cL[i] = 'a';
                if (c == 'B') cL[i] = 'b';
                if (c == 'C') cL[i] = 'c';
            } if (c == 'A') cL[i] = 'a'; c == 'A' c 'A' cL[i] = 'a' cL[i] cL i 'a' if (c == 'B') cL[i] = 'b'; c == 'B' c 'B' cL[i] = 'b' cL[i] cL i 'b' if (c == 'C') cL[i] = 'c'; c == 'C' c 'C' cL[i] = 'c' cL[i] cL i 'c' {
                cL[i] = c;
            } cL[i] = c cL[i] cL i c for (char c : cL) {
            System.out.print(c);
        } char c cL {
            System.out.print(c);
        } {
            System.out.print(c);
        } System.out.print(c) System.out.print System.out System System.out c 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();
        char[] cL = new char[n];
        for (int i = 0;i<n; i++) {
            char c = s.charAt(i);
            if (i+1 == k) {
                if (c == 'A') cL[i] = 'a';
                if (c == 'B') cL[i] = 'b';
                if (c == 'C') cL[i] = 'c';
            } else {
                cL[i] = c;
            }
        }
        for (char c : cL) {
            System.out.print(c);
        }
    }
} 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();
        char[] cL = new char[n];
        for (int i = 0;i<n; i++) {
            char c = s.charAt(i);
            if (i+1 == k) {
                if (c == 'A') cL[i] = 'a';
                if (c == 'B') cL[i] = 'b';
                if (c == 'C') cL[i] = 'c';
            } else {
                cL[i] = c;
            }
        }
        for (char c : cL) {
            System.out.print(c);
        }
    }
} 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();
        char[] cL = new char[n];
        for (int i = 0;i<n; i++) {
            char c = s.charAt(i);
            if (i+1 == k) {
                if (c == 'A') cL[i] = 'a';
                if (c == 'B') cL[i] = 'b';
                if (c == 'C') cL[i] = 'c';
            } else {
                cL[i] = c;
            }
        }
        for (char c : cL) {
            System.out.print(c);
        }
    }
}