import java.util.Scanner;



public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String num1 = sc.next();
        String num2 = sc.next();
        int N = Integer.parseInt(num1);
        int K = Integer.parseInt(num2);
        String str = sc.next();
        char c[] = str.toCharArray();
        
        c[K - 1] = (char) (c[K - 1] - ('A' - 'a'));
        
        for(char ch : c){
            System.out.print(ch);
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String num1 = sc.next();
        String num2 = sc.next();
        int N = Integer.parseInt(num1);
        int K = Integer.parseInt(num2);
        String str = sc.next();
        char c[] = str.toCharArray();
        
        c[K - 1] = (char) (c[K - 1] - ('A' - 'a'));
        
        for(char ch : c){
            System.out.print(ch);
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String num1 = sc.next();
        String num2 = sc.next();
        int N = Integer.parseInt(num1);
        int K = Integer.parseInt(num2);
        String str = sc.next();
        char c[] = str.toCharArray();
        
        c[K - 1] = (char) (c[K - 1] - ('A' - 'a'));
        
        for(char ch : c){
            System.out.print(ch);
        }
    } main {
        Scanner sc = new Scanner(System.in);
        String num1 = sc.next();
        String num2 = sc.next();
        int N = Integer.parseInt(num1);
        int K = Integer.parseInt(num2);
        String str = sc.next();
        char c[] = str.toCharArray();
        
        c[K - 1] = (char) (c[K - 1] - ('A' - 'a'));
        
        for(char ch : c){
            System.out.print(ch);
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String num1 = sc.next(); num1 sc.next() sc.next sc String num2 = sc.next(); num2 sc.next() sc.next sc int N = Integer.parseInt(num1); N Integer.parseInt(num1) Integer.parseInt Integer num1 int K = Integer.parseInt(num2); K Integer.parseInt(num2) Integer.parseInt Integer num2 String str = sc.next(); str sc.next() sc.next sc char c[] = str.toCharArray(); c str.toCharArray() str.toCharArray str c[K - 1] = (char) (c[K - 1] - ('A' - 'a')) c[K - 1] c K - 1 K 1 (char) (c[K - 1] - ('A' - 'a')) c[K - 1] c K - 1 K 1 ('A' - 'a') 'A' 'a' for(char ch : c){
            System.out.print(ch);
        } char ch c {
            System.out.print(ch);
        } {
            System.out.print(ch);
        } System.out.print(ch) System.out.print System.out System System.out ch String[] args args public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String num1 = sc.next();
        String num2 = sc.next();
        int N = Integer.parseInt(num1);
        int K = Integer.parseInt(num2);
        String str = sc.next();
        char c[] = str.toCharArray();
        
        c[K - 1] = (char) (c[K - 1] - ('A' - 'a'));
        
        for(char ch : c){
            System.out.print(ch);
        }
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String num1 = sc.next();
        String num2 = sc.next();
        int N = Integer.parseInt(num1);
        int K = Integer.parseInt(num2);
        String str = sc.next();
        char c[] = str.toCharArray();
        
        c[K - 1] = (char) (c[K - 1] - ('A' - 'a'));
        
        for(char ch : c){
            System.out.print(ch);
        }
    }
} Main
import java.util.Scanner;



public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String num1 = sc.next();
        String num2 = sc.next();
        int N = Integer.parseInt(num1);
        int K = Integer.parseInt(num2);
        String str = sc.next();
        char c[] = str.toCharArray();
        
        c[K - 1] = (char) (c[K - 1] - ('A' - 'a'));
        
        for(char ch : c){
            System.out.print(ch);
        }
    }
}
