import java.util.Scanner;

public class Main {

    public static String process(int N, int K, String S) {
        return S.substring(0, K - 1) + S.substring(K - 1, K).toLowerCase() + S.substring(K);
    }

    // Util func

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

        int N = sc.nextInt();
        int K = sc.nextInt();
        String S = sc.next();

        final String result = process(N, K, S);

        output(result);
    }

    private static void output(String result) {
        System.out.println(result);
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static String process(int N, int K, String S) {
        return S.substring(0, K - 1) + S.substring(K - 1, K).toLowerCase() + S.substring(K);
    }

    // Util func

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

        int N = sc.nextInt();
        int K = sc.nextInt();
        String S = sc.next();

        final String result = process(N, K, S);

        output(result);
    }

    private static void output(String result) {
        System.out.println(result);
    }
} Main public static String process(int N, int K, String S) {
        return S.substring(0, K - 1) + S.substring(K - 1, K).toLowerCase() + S.substring(K);
    } process {
        return S.substring(0, K - 1) + S.substring(K - 1, K).toLowerCase() + S.substring(K);
    } return S.substring(0, K - 1) + S.substring(K - 1, K).toLowerCase() + S.substring(K); S.substring(0, K - 1) + S.substring(K - 1, K).toLowerCase() + S.substring(K) S.substring(0, K - 1) + S.substring(K - 1, K).toLowerCase() + S.substring(K) S.substring(0, K - 1) S.substring S 0 K - 1 K 1 S.substring(K - 1, K).toLowerCase() S.substring(K - 1, K).toLowerCase S.substring(K - 1, K) S.substring S K - 1 K 1 K S.substring(K) S.substring S K int N N int K K String S S public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int K = sc.nextInt();
        String S = sc.next();

        final String result = process(N, K, S);

        output(result);
    } main {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int K = sc.nextInt();
        String S = sc.next();

        final String result = process(N, K, S);

        output(result);
    } 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 final String result = process(N, K, S); result process(N, K, S) process N K S output(result) output result String[] args args private static void output(String result) {
        System.out.println(result);
    } output {
        System.out.println(result);
    } System.out.println(result) System.out.println System.out System System.out result String result result public class Main {

    public static String process(int N, int K, String S) {
        return S.substring(0, K - 1) + S.substring(K - 1, K).toLowerCase() + S.substring(K);
    }

    // Util func

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

        int N = sc.nextInt();
        int K = sc.nextInt();
        String S = sc.next();

        final String result = process(N, K, S);

        output(result);
    }

    private static void output(String result) {
        System.out.println(result);
    }
} public class Main {

    public static String process(int N, int K, String S) {
        return S.substring(0, K - 1) + S.substring(K - 1, K).toLowerCase() + S.substring(K);
    }

    // Util func

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

        int N = sc.nextInt();
        int K = sc.nextInt();
        String S = sc.next();

        final String result = process(N, K, S);

        output(result);
    }

    private static void output(String result) {
        System.out.println(result);
    }
} Main
import java.util.Scanner;

public class Main {

    public static String process(int N, int K, String S) {
        return S.substring(0, K - 1) + S.substring(K - 1, K).toLowerCase() + S.substring(K);
    }

    // Util func

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

        int N = sc.nextInt();
        int K = sc.nextInt();
        String S = sc.next();

        final String result = process(N, K, S);

        output(result);
    }

    private static void output(String result) {
        System.out.println(result);
    }
}
