import java.util.Scanner;

public class Main {
    public static void main(String args[]) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int k = scan.nextInt();
        String s = scan.next();

        String[] strArray = s.split("");
        strArray[k - 1] = strArray[k - 1].toLowerCase();
        s = String.join("", strArray);

        System.out.println(s);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String args[]) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int k = scan.nextInt();
        String s = scan.next();

        String[] strArray = s.split("");
        strArray[k - 1] = strArray[k - 1].toLowerCase();
        s = String.join("", strArray);

        System.out.println(s);
    }
} Main public static void main(String args[]) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int k = scan.nextInt();
        String s = scan.next();

        String[] strArray = s.split("");
        strArray[k - 1] = strArray[k - 1].toLowerCase();
        s = String.join("", strArray);

        System.out.println(s);
    } main {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int k = scan.nextInt();
        String s = scan.next();

        String[] strArray = s.split("");
        strArray[k - 1] = strArray[k - 1].toLowerCase();
        s = String.join("", strArray);

        System.out.println(s);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int k = scan.nextInt(); k scan.nextInt() scan.nextInt scan String s = scan.next(); s scan.next() scan.next scan String[] strArray = s.split(""); strArray s.split("") s.split s "" strArray[k - 1] = strArray[k - 1].toLowerCase() strArray[k - 1] strArray k - 1 k 1 strArray[k - 1].toLowerCase() strArray[k - 1].toLowerCase strArray[k - 1] strArray k - 1 k 1 s = String.join("", strArray) s String.join("", strArray) String.join String "" strArray System.out.println(s) System.out.println System.out System System.out s String args[] args public class Main {
    public static void main(String args[]) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int k = scan.nextInt();
        String s = scan.next();

        String[] strArray = s.split("");
        strArray[k - 1] = strArray[k - 1].toLowerCase();
        s = String.join("", strArray);

        System.out.println(s);
    }
} public class Main {
    public static void main(String args[]) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int k = scan.nextInt();
        String s = scan.next();

        String[] strArray = s.split("");
        strArray[k - 1] = strArray[k - 1].toLowerCase();
        s = String.join("", strArray);

        System.out.println(s);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String args[]) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int k = scan.nextInt();
        String s = scan.next();

        String[] strArray = s.split("");
        strArray[k - 1] = strArray[k - 1].toLowerCase();
        s = String.join("", strArray);

        System.out.println(s);
    }
}