import java.util.Scanner;

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();
        sc.close();
        char[] arr = s.toCharArray();
        arr[K - 1] = s.toLowerCase().toCharArray()[K - 1];
        System.out.println(String.valueOf(arr));
    }
} import java.util.Scanner; Scanner java.util 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();
        sc.close();
        char[] arr = s.toCharArray();
        arr[K - 1] = s.toLowerCase().toCharArray()[K - 1];
        System.out.println(String.valueOf(arr));
    }
} 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();
        sc.close();
        char[] arr = s.toCharArray();
        arr[K - 1] = s.toLowerCase().toCharArray()[K - 1];
        System.out.println(String.valueOf(arr));
    } main {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int K = Integer.parseInt(sc.next());
        String s = sc.next();
        sc.close();
        char[] arr = s.toCharArray();
        arr[K - 1] = s.toLowerCase().toCharArray()[K - 1];
        System.out.println(String.valueOf(arr));
    } 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 sc.close() sc.close sc char[] arr = s.toCharArray(); arr s.toCharArray() s.toCharArray s arr[K - 1] = s.toLowerCase().toCharArray()[K - 1] arr[K - 1] arr K - 1 K 1 s.toLowerCase().toCharArray()[K - 1] s.toLowerCase().toCharArray() s.toLowerCase().toCharArray s.toLowerCase() s.toLowerCase s K - 1 K 1 System.out.println(String.valueOf(arr)) System.out.println System.out System System.out String.valueOf(arr) String.valueOf String arr String[] args args
import java.util.Scanner;

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();
        sc.close();
        char[] arr = s.toCharArray();
        arr[K - 1] = s.toLowerCase().toCharArray()[K - 1];
        System.out.println(String.valueOf(arr));
    }
}