import java.util.*;
import java.lang.String;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String vStr = sc.nextLine();
        Map<Integer, Integer> vList = str2List(vStr);

        int n = vList.get(0);
        int k = vList.get(1);

        String s = sc.nextLine();
        String sArr[] = s.split("");

        switch (sArr[k-1]) {
            case "A":
                sArr[k-1] = "a";
                break;
            case "B":
                sArr[k-1] = "b";
                break;
            case "C":
                sArr[k-1] = "c";
                break;
        }

        for (int i = 0; i < n; i++) {
            System.out.print(sArr[i]);
        }
    }

    static Map<Integer, Integer> str2List(String str) {
        String[] vArrStr = str.split(" ");

        Map<Integer, Integer> ret = new HashMap<>();
        Integer key = 0;
        for (String val:vArrStr) {
            ret.put(key, Integer.valueOf(val));
            key++;
        }

        return ret;
    }
} import java.util.*; util.* java import java.lang.String; String java.lang public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String vStr = sc.nextLine();
        Map<Integer, Integer> vList = str2List(vStr);

        int n = vList.get(0);
        int k = vList.get(1);

        String s = sc.nextLine();
        String sArr[] = s.split("");

        switch (sArr[k-1]) {
            case "A":
                sArr[k-1] = "a";
                break;
            case "B":
                sArr[k-1] = "b";
                break;
            case "C":
                sArr[k-1] = "c";
                break;
        }

        for (int i = 0; i < n; i++) {
            System.out.print(sArr[i]);
        }
    }

    static Map<Integer, Integer> str2List(String str) {
        String[] vArrStr = str.split(" ");

        Map<Integer, Integer> ret = new HashMap<>();
        Integer key = 0;
        for (String val:vArrStr) {
            ret.put(key, Integer.valueOf(val));
            key++;
        }

        return ret;
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String vStr = sc.nextLine();
        Map<Integer, Integer> vList = str2List(vStr);

        int n = vList.get(0);
        int k = vList.get(1);

        String s = sc.nextLine();
        String sArr[] = s.split("");

        switch (sArr[k-1]) {
            case "A":
                sArr[k-1] = "a";
                break;
            case "B":
                sArr[k-1] = "b";
                break;
            case "C":
                sArr[k-1] = "c";
                break;
        }

        for (int i = 0; i < n; i++) {
            System.out.print(sArr[i]);
        }
    } main {
        Scanner sc = new Scanner(System.in);

        String vStr = sc.nextLine();
        Map<Integer, Integer> vList = str2List(vStr);

        int n = vList.get(0);
        int k = vList.get(1);

        String s = sc.nextLine();
        String sArr[] = s.split("");

        switch (sArr[k-1]) {
            case "A":
                sArr[k-1] = "a";
                break;
            case "B":
                sArr[k-1] = "b";
                break;
            case "C":
                sArr[k-1] = "c";
                break;
        }

        for (int i = 0; i < n; i++) {
            System.out.print(sArr[i]);
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String vStr = sc.nextLine(); vStr sc.nextLine() sc.nextLine sc Map<Integer, Integer> vList = str2List(vStr); vList str2List(vStr) str2List vStr int n = vList.get(0); n vList.get(0) vList.get vList 0 int k = vList.get(1); k vList.get(1) vList.get vList 1 String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc String sArr[] = s.split(""); sArr s.split("") s.split s "" switch (sArr[k-1]) {
            case "A":
                sArr[k-1] = "a";
                break;
            case "B":
                sArr[k-1] = "b";
                break;
            case "C":
                sArr[k-1] = "c";
                break;
        } sArr[k-1] sArr k-1 k 1 case "A": "A" case "A": sArr[k-1] = "a" sArr[k-1] sArr k-1 k 1 "a" break; case "B": "B" case "B": sArr[k-1] = "b" sArr[k-1] sArr k-1 k 1 "b" break; case "C": "C" case "C": sArr[k-1] = "c" sArr[k-1] sArr k-1 k 1 "c" break; for (int i = 0; i < n; i++) {
            System.out.print(sArr[i]);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            System.out.print(sArr[i]);
        } {
            System.out.print(sArr[i]);
        } System.out.print(sArr[i]) System.out.print System.out System System.out sArr[i] sArr i String[] args args static Map<Integer, Integer> str2List(String str) {
        String[] vArrStr = str.split(" ");

        Map<Integer, Integer> ret = new HashMap<>();
        Integer key = 0;
        for (String val:vArrStr) {
            ret.put(key, Integer.valueOf(val));
            key++;
        }

        return ret;
    } str2List {
        String[] vArrStr = str.split(" ");

        Map<Integer, Integer> ret = new HashMap<>();
        Integer key = 0;
        for (String val:vArrStr) {
            ret.put(key, Integer.valueOf(val));
            key++;
        }

        return ret;
    } String[] vArrStr = str.split(" "); vArrStr str.split(" ") str.split str " " Map<Integer, Integer> ret = new HashMap<>(); ret new HashMap<>() Integer key = 0; key 0 for (String val:vArrStr) {
            ret.put(key, Integer.valueOf(val));
            key++;
        } String val vArrStr {
            ret.put(key, Integer.valueOf(val));
            key++;
        } {
            ret.put(key, Integer.valueOf(val));
            key++;
        } ret.put(key, Integer.valueOf(val)) ret.put ret key Integer.valueOf(val) Integer.valueOf Integer val key++ key return ret; ret String str str public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String vStr = sc.nextLine();
        Map<Integer, Integer> vList = str2List(vStr);

        int n = vList.get(0);
        int k = vList.get(1);

        String s = sc.nextLine();
        String sArr[] = s.split("");

        switch (sArr[k-1]) {
            case "A":
                sArr[k-1] = "a";
                break;
            case "B":
                sArr[k-1] = "b";
                break;
            case "C":
                sArr[k-1] = "c";
                break;
        }

        for (int i = 0; i < n; i++) {
            System.out.print(sArr[i]);
        }
    }

    static Map<Integer, Integer> str2List(String str) {
        String[] vArrStr = str.split(" ");

        Map<Integer, Integer> ret = new HashMap<>();
        Integer key = 0;
        for (String val:vArrStr) {
            ret.put(key, Integer.valueOf(val));
            key++;
        }

        return ret;
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String vStr = sc.nextLine();
        Map<Integer, Integer> vList = str2List(vStr);

        int n = vList.get(0);
        int k = vList.get(1);

        String s = sc.nextLine();
        String sArr[] = s.split("");

        switch (sArr[k-1]) {
            case "A":
                sArr[k-1] = "a";
                break;
            case "B":
                sArr[k-1] = "b";
                break;
            case "C":
                sArr[k-1] = "c";
                break;
        }

        for (int i = 0; i < n; i++) {
            System.out.print(sArr[i]);
        }
    }

    static Map<Integer, Integer> str2List(String str) {
        String[] vArrStr = str.split(" ");

        Map<Integer, Integer> ret = new HashMap<>();
        Integer key = 0;
        for (String val:vArrStr) {
            ret.put(key, Integer.valueOf(val));
            key++;
        }

        return ret;
    }
} Main
import java.util.*;
import java.lang.String;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String vStr = sc.nextLine();
        Map<Integer, Integer> vList = str2List(vStr);

        int n = vList.get(0);
        int k = vList.get(1);

        String s = sc.nextLine();
        String sArr[] = s.split("");

        switch (sArr[k-1]) {
            case "A":
                sArr[k-1] = "a";
                break;
            case "B":
                sArr[k-1] = "b";
                break;
            case "C":
                sArr[k-1] = "c";
                break;
        }

        for (int i = 0; i < n; i++) {
            System.out.print(sArr[i]);
        }
    }

    static Map<Integer, Integer> str2List(String str) {
        String[] vArrStr = str.split(" ");

        Map<Integer, Integer> ret = new HashMap<>();
        Integer key = 0;
        for (String val:vArrStr) {
            ret.put(key, Integer.valueOf(val));
            key++;
        }

        return ret;
    }
}
