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

//        Character change = s.charAt(k-1);
        String change = s.substring(k-1, k);
        change = change.toLowerCase();


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


        System.out.print(before + change + after);

    }
}

 import java.util.*; util.* java 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();

//        Character change = s.charAt(k-1);
        String change = s.substring(k-1, k);
        change = change.toLowerCase();


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


        System.out.print(before + change + 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();

//        Character change = s.charAt(k-1);
        String change = s.substring(k-1, k);
        change = change.toLowerCase();


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


        System.out.print(before + change + after);

    } main {

        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int k = sc.nextInt();
        String s = sc.next();

//        Character change = s.charAt(k-1);
        String change = s.substring(k-1, k);
        change = change.toLowerCase();


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


        System.out.print(before + change + 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 String change = s.substring(k-1, k); change s.substring(k-1, k) s.substring s k-1 k 1 k change = change.toLowerCase() change change.toLowerCase() change.toLowerCase change 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); after s.substring(k) s.substring s k System.out.print(before + change + after) System.out.print System.out System System.out before + change + after before + change + after before change 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();

//        Character change = s.charAt(k-1);
        String change = s.substring(k-1, k);
        change = change.toLowerCase();


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


        System.out.print(before + change + 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();

//        Character change = s.charAt(k-1);
        String change = s.substring(k-1, k);
        change = change.toLowerCase();


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


        System.out.print(before + change + after);

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

//        Character change = s.charAt(k-1);
        String change = s.substring(k-1, k);
        change = change.toLowerCase();


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


        System.out.print(before + change + after);

    }
}


