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();

        String s = sc.next();

        char c1 = s.charAt(k-1);
        String c2 = (String.valueOf(c1)).toLowerCase();

        String before = s.substring(0, k-1);
        String after = s.substring(k, s.length());

        System.out.println(before + c2 + after);

    }

} 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();

        String s = sc.next();

        char c1 = s.charAt(k-1);
        String c2 = (String.valueOf(c1)).toLowerCase();

        String before = s.substring(0, k-1);
        String after = s.substring(k, s.length());

        System.out.println(before + c2 + after);

    }

} Main public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();

        String s = sc.next();

        char c1 = s.charAt(k-1);
        String c2 = (String.valueOf(c1)).toLowerCase();

        String before = s.substring(0, k-1);
        String after = s.substring(k, s.length());

        System.out.println(before + c2 + after);

    } main {

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();

        String s = sc.next();

        char c1 = s.charAt(k-1);
        String c2 = (String.valueOf(c1)).toLowerCase();

        String before = s.substring(0, k-1);
        String after = s.substring(k, s.length());

        System.out.println(before + c2 + after);

    } 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 char c1 = s.charAt(k-1); c1 s.charAt(k-1) s.charAt s k-1 k 1 String c2 = (String.valueOf(c1)).toLowerCase(); c2 (String.valueOf(c1)).toLowerCase() (String.valueOf(c1)).toLowerCase (String.valueOf(c1)) String.valueOf String c1 String before = s.substring(0, k-1); before s.substring(0, k-1) s.substring s 0 k-1 k 1 String after = s.substring(k, s.length()); after s.substring(k, s.length()) s.substring s k s.length() s.length s System.out.println(before + c2 + after) System.out.println System.out System System.out before + c2 + after before + c2 + after before c2 after 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();

        String s = sc.next();

        char c1 = s.charAt(k-1);
        String c2 = (String.valueOf(c1)).toLowerCase();

        String before = s.substring(0, k-1);
        String after = s.substring(k, s.length());

        System.out.println(before + c2 + after);

    }

} public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();

        String s = sc.next();

        char c1 = s.charAt(k-1);
        String c2 = (String.valueOf(c1)).toLowerCase();

        String before = s.substring(0, k-1);
        String after = s.substring(k, s.length());

        System.out.println(before + c2 + after);

    }

} 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();

        String s = sc.next();

        char c1 = s.charAt(k-1);
        String c2 = (String.valueOf(c1)).toLowerCase();

        String before = s.substring(0, k-1);
        String after = s.substring(k, s.length());

        System.out.println(before + c2 + after);

    }

}