import java.util.*;

public class Main {
    public static void main(String[] args) {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        String str = sc.next();
        
        str = str.substring(0,k-1).toUpperCase() + str.substring(k-1,k).toLowerCase() + str.substring(k,n).toUpperCase();
        
        System.out.println(str);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        String str = sc.next();
        
        str = str.substring(0,k-1).toUpperCase() + str.substring(k-1,k).toLowerCase() + str.substring(k,n).toUpperCase();
        
        System.out.println(str);
    }
} Main public static void main(String[] args) {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        String str = sc.next();
        
        str = str.substring(0,k-1).toUpperCase() + str.substring(k-1,k).toLowerCase() + str.substring(k,n).toUpperCase();
        
        System.out.println(str);
    } main {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        String str = sc.next();
        
        str = str.substring(0,k-1).toUpperCase() + str.substring(k-1,k).toLowerCase() + str.substring(k,n).toUpperCase();
        
        System.out.println(str);
    } 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 str = sc.next(); str sc.next() sc.next sc str = str.substring(0,k-1).toUpperCase() + str.substring(k-1,k).toLowerCase() + str.substring(k,n).toUpperCase() str str.substring(0,k-1).toUpperCase() + str.substring(k-1,k).toLowerCase() + str.substring(k,n).toUpperCase() str.substring(0,k-1).toUpperCase() + str.substring(k-1,k).toLowerCase() + str.substring(k,n).toUpperCase() str.substring(0,k-1).toUpperCase() str.substring(0,k-1).toUpperCase str.substring(0,k-1) str.substring str 0 k-1 k 1 str.substring(k-1,k).toLowerCase() str.substring(k-1,k).toLowerCase str.substring(k-1,k) str.substring str k-1 k 1 k str.substring(k,n).toUpperCase() str.substring(k,n).toUpperCase str.substring(k,n) str.substring str k n System.out.println(str) System.out.println System.out System System.out str String[] args args public class Main {
    public static void main(String[] args) {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        String str = sc.next();
        
        str = str.substring(0,k-1).toUpperCase() + str.substring(k-1,k).toLowerCase() + str.substring(k,n).toUpperCase();
        
        System.out.println(str);
    }
} public class Main {
    public static void main(String[] args) {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        String str = sc.next();
        
        str = str.substring(0,k-1).toUpperCase() + str.substring(k-1,k).toLowerCase() + str.substring(k,n).toUpperCase();
        
        System.out.println(str);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        String str = sc.next();
        
        str = str.substring(0,k-1).toUpperCase() + str.substring(k-1,k).toLowerCase() + str.substring(k,n).toUpperCase();
        
        System.out.println(str);
    }
}
