import java.util.Scanner;

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

        System.out.println(s.substring(0, k - 1) + s.valueOf(s.charAt(k - 1)).toLowerCase() + s.substring(k));
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int k = Integer.parseInt(sc.next());
        String s = sc.next();

        System.out.println(s.substring(0, k - 1) + s.valueOf(s.charAt(k - 1)).toLowerCase() + s.substring(k));
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int k = Integer.parseInt(sc.next());
        String s = sc.next();

        System.out.println(s.substring(0, k - 1) + s.valueOf(s.charAt(k - 1)).toLowerCase() + s.substring(k));
    } main {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int k = Integer.parseInt(sc.next());
        String s = sc.next();

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

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

        System.out.println(s.substring(0, k - 1) + s.valueOf(s.charAt(k - 1)).toLowerCase() + s.substring(k));
    }
} Main
import java.util.Scanner;

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

        System.out.println(s.substring(0, k - 1) + s.valueOf(s.charAt(k - 1)).toLowerCase() + s.substring(k));
    }
}
