import java.util.*;
import java.util.stream.*;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        in.nextInt();
        int k = in.nextInt() - 1;
        in.nextLine();
        char[] arr = in.nextLine().toCharArray();
        arr[k] = Character.toLowerCase(arr[k]);
        System.out.println(new String(arr));
    }
} import java.util.*; util.* java import java.util.stream.*; stream.* java.util public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        in.nextInt();
        int k = in.nextInt() - 1;
        in.nextLine();
        char[] arr = in.nextLine().toCharArray();
        arr[k] = Character.toLowerCase(arr[k]);
        System.out.println(new String(arr));
    }
} Main public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        in.nextInt();
        int k = in.nextInt() - 1;
        in.nextLine();
        char[] arr = in.nextLine().toCharArray();
        arr[k] = Character.toLowerCase(arr[k]);
        System.out.println(new String(arr));
    } main {
        Scanner in = new Scanner(System.in);
        in.nextInt();
        int k = in.nextInt() - 1;
        in.nextLine();
        char[] arr = in.nextLine().toCharArray();
        arr[k] = Character.toLowerCase(arr[k]);
        System.out.println(new String(arr));
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) in.nextInt() in.nextInt in int k = in.nextInt() - 1; k in.nextInt() - 1 in.nextInt() in.nextInt in 1 in.nextLine() in.nextLine in char[] arr = in.nextLine().toCharArray(); arr in.nextLine().toCharArray() in.nextLine().toCharArray in.nextLine() in.nextLine in arr[k] = Character.toLowerCase(arr[k]) arr[k] arr k Character.toLowerCase(arr[k]) Character.toLowerCase Character arr[k] arr k System.out.println(new String(arr)) System.out.println System.out System System.out new String(arr) String[] args args public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        in.nextInt();
        int k = in.nextInt() - 1;
        in.nextLine();
        char[] arr = in.nextLine().toCharArray();
        arr[k] = Character.toLowerCase(arr[k]);
        System.out.println(new String(arr));
    }
} public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        in.nextInt();
        int k = in.nextInt() - 1;
        in.nextLine();
        char[] arr = in.nextLine().toCharArray();
        arr[k] = Character.toLowerCase(arr[k]);
        System.out.println(new String(arr));
    }
} Main
import java.util.*;
import java.util.stream.*;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        in.nextInt();
        int k = in.nextInt() - 1;
        in.nextLine();
        char[] arr = in.nextLine().toCharArray();
        arr[k] = Character.toLowerCase(arr[k]);
        System.out.println(new String(arr));
    }
}
