import java.util.Scanner;

public class Main {

    private static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        int n = sc.nextInt();
        int k = sc.nextInt();
        String s = sc.next();
        String[] sl = s.split("");
        if (sl[k-1].equals("A")) {
            sl[k-1] = "a";
        } else if (sl[k-1].equals("B")) {
            sl[k-1] = "b";
        } else if (sl[k-1].equals("C")) {
            sl[k-1] = "c";
        }
        System.out.println(String.join("", sl));
    }

} import java.util.Scanner; Scanner java.util public class Main {

    private static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        int n = sc.nextInt();
        int k = sc.nextInt();
        String s = sc.next();
        String[] sl = s.split("");
        if (sl[k-1].equals("A")) {
            sl[k-1] = "a";
        } else if (sl[k-1].equals("B")) {
            sl[k-1] = "b";
        } else if (sl[k-1].equals("C")) {
            sl[k-1] = "c";
        }
        System.out.println(String.join("", sl));
    }

} Main private static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) {
        int n = sc.nextInt();
        int k = sc.nextInt();
        String s = sc.next();
        String[] sl = s.split("");
        if (sl[k-1].equals("A")) {
            sl[k-1] = "a";
        } else if (sl[k-1].equals("B")) {
            sl[k-1] = "b";
        } else if (sl[k-1].equals("C")) {
            sl[k-1] = "c";
        }
        System.out.println(String.join("", sl));
    } main {
        int n = sc.nextInt();
        int k = sc.nextInt();
        String s = sc.next();
        String[] sl = s.split("");
        if (sl[k-1].equals("A")) {
            sl[k-1] = "a";
        } else if (sl[k-1].equals("B")) {
            sl[k-1] = "b";
        } else if (sl[k-1].equals("C")) {
            sl[k-1] = "c";
        }
        System.out.println(String.join("", sl));
    } 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 String[] sl = s.split(""); sl s.split("") s.split s "" if (sl[k-1].equals("A")) {
            sl[k-1] = "a";
        } else if (sl[k-1].equals("B")) {
            sl[k-1] = "b";
        } else if (sl[k-1].equals("C")) {
            sl[k-1] = "c";
        } sl[k-1].equals("A") sl[k-1].equals sl[k-1] sl k-1 k 1 "A" {
            sl[k-1] = "a";
        } sl[k-1] = "a" sl[k-1] sl k-1 k 1 "a" if (sl[k-1].equals("B")) {
            sl[k-1] = "b";
        } else if (sl[k-1].equals("C")) {
            sl[k-1] = "c";
        } sl[k-1].equals("B") sl[k-1].equals sl[k-1] sl k-1 k 1 "B" {
            sl[k-1] = "b";
        } sl[k-1] = "b" sl[k-1] sl k-1 k 1 "b" if (sl[k-1].equals("C")) {
            sl[k-1] = "c";
        } sl[k-1].equals("C") sl[k-1].equals sl[k-1] sl k-1 k 1 "C" {
            sl[k-1] = "c";
        } sl[k-1] = "c" sl[k-1] sl k-1 k 1 "c" System.out.println(String.join("", sl)) System.out.println System.out System System.out String.join("", sl) String.join String "" sl String[] args args public class Main {

    private static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        int n = sc.nextInt();
        int k = sc.nextInt();
        String s = sc.next();
        String[] sl = s.split("");
        if (sl[k-1].equals("A")) {
            sl[k-1] = "a";
        } else if (sl[k-1].equals("B")) {
            sl[k-1] = "b";
        } else if (sl[k-1].equals("C")) {
            sl[k-1] = "c";
        }
        System.out.println(String.join("", sl));
    }

} public class Main {

    private static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        int n = sc.nextInt();
        int k = sc.nextInt();
        String s = sc.next();
        String[] sl = s.split("");
        if (sl[k-1].equals("A")) {
            sl[k-1] = "a";
        } else if (sl[k-1].equals("B")) {
            sl[k-1] = "b";
        } else if (sl[k-1].equals("C")) {
            sl[k-1] = "c";
        }
        System.out.println(String.join("", sl));
    }

} Main
import java.util.Scanner;

public class Main {

    private static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        int n = sc.nextInt();
        int k = sc.nextInt();
        String s = sc.next();
        String[] sl = s.split("");
        if (sl[k-1].equals("A")) {
            sl[k-1] = "a";
        } else if (sl[k-1].equals("B")) {
            sl[k-1] = "b";
        } else if (sl[k-1].equals("C")) {
            sl[k-1] = "c";
        }
        System.out.println(String.join("", sl));
    }

}
