import java.util.Scanner;

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

        s[change-1] = Character.toLowerCase(s[change-1]);
        System.out.println(new String(s));
    }
}

 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 change = sc.nextInt();
        char[] s = sc.next().toCharArray();

        s[change-1] = Character.toLowerCase(s[change-1]);
        System.out.println(new String(s));
    }
} Main public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int change = sc.nextInt();
        char[] s = sc.next().toCharArray();

        s[change-1] = Character.toLowerCase(s[change-1]);
        System.out.println(new String(s));
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int change = sc.nextInt();
        char[] s = sc.next().toCharArray();

        s[change-1] = Character.toLowerCase(s[change-1]);
        System.out.println(new String(s));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int change = sc.nextInt(); change sc.nextInt() sc.nextInt sc char[] s = sc.next().toCharArray(); s sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc s[change-1] = Character.toLowerCase(s[change-1]) s[change-1] s change-1 change 1 Character.toLowerCase(s[change-1]) Character.toLowerCase Character s[change-1] s change-1 change 1 System.out.println(new String(s)) System.out.println System.out System System.out new String(s) String args[] args public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int change = sc.nextInt();
        char[] s = sc.next().toCharArray();

        s[change-1] = Character.toLowerCase(s[change-1]);
        System.out.println(new String(s));
    }
} public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int change = sc.nextInt();
        char[] s = sc.next().toCharArray();

        s[change-1] = Character.toLowerCase(s[change-1]);
        System.out.println(new String(s));
    }
} 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 change = sc.nextInt();
        char[] s = sc.next().toCharArray();

        s[change-1] = Character.toLowerCase(s[change-1]);
        System.out.println(new String(s));
    }
}


