import java.util.Scanner;

public class Main {
    public static void main (String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        sc.nextLine();
        String s = sc.nextLine();
        sc.close();
        System.out.println(s.substring(0, k - 1) + Character.toLowerCase(s.charAt(k - 1)) + s.substring(k, n));
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main (String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        sc.nextLine();
        String s = sc.nextLine();
        sc.close();
        System.out.println(s.substring(0, k - 1) + Character.toLowerCase(s.charAt(k - 1)) + s.substring(k, n));
    }
} Main public static void main (String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        sc.nextLine();
        String s = sc.nextLine();
        sc.close();
        System.out.println(s.substring(0, k - 1) + Character.toLowerCase(s.charAt(k - 1)) + s.substring(k, n));
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        sc.nextLine();
        String s = sc.nextLine();
        sc.close();
        System.out.println(s.substring(0, k - 1) + Character.toLowerCase(s.charAt(k - 1)) + s.substring(k, n));
    } 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 sc.nextLine() sc.nextLine sc String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc sc.close() sc.close sc System.out.println(s.substring(0, k - 1) + Character.toLowerCase(s.charAt(k - 1)) + s.substring(k, n)) System.out.println System.out System System.out s.substring(0, k - 1) + Character.toLowerCase(s.charAt(k - 1)) + s.substring(k, n) s.substring(0, k - 1) + Character.toLowerCase(s.charAt(k - 1)) + s.substring(k, n) s.substring(0, k - 1) s.substring s 0 k - 1 k 1 Character.toLowerCase(s.charAt(k - 1)) Character.toLowerCase Character s.charAt(k - 1) s.charAt s k - 1 k 1 s.substring(k, n) s.substring s k n String[] args args public class Main {
    public static void main (String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        sc.nextLine();
        String s = sc.nextLine();
        sc.close();
        System.out.println(s.substring(0, k - 1) + Character.toLowerCase(s.charAt(k - 1)) + s.substring(k, n));
    }
} public class Main {
    public static void main (String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        sc.nextLine();
        String s = sc.nextLine();
        sc.close();
        System.out.println(s.substring(0, k - 1) + Character.toLowerCase(s.charAt(k - 1)) + s.substring(k, n));
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main (String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        sc.nextLine();
        String s = sc.nextLine();
        sc.close();
        System.out.println(s.substring(0, k - 1) + Character.toLowerCase(s.charAt(k - 1)) + s.substring(k, n));
    }
}
