import java.util.Scanner;
import java.lang.Character;

public class Main {
    public static void main (String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            int n = sc.nextInt();
            int k = sc.nextInt();
            String s = sc.next();
            String res = "";
            char ch;            

            for (int i = 0; i < n; i++) {
                if (i == k - 1) {
                    ch = Character.toLowerCase(s.charAt(i));                
                }            
                else {
                    ch = s.charAt(i);
                }
                res += "" + ch;
            }
            System.out.println(res);
        }           
    }
} import java.util.Scanner; Scanner java.util import java.lang.Character; Character java.lang public class Main {
    public static void main (String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            int n = sc.nextInt();
            int k = sc.nextInt();
            String s = sc.next();
            String res = "";
            char ch;            

            for (int i = 0; i < n; i++) {
                if (i == k - 1) {
                    ch = Character.toLowerCase(s.charAt(i));                
                }            
                else {
                    ch = s.charAt(i);
                }
                res += "" + ch;
            }
            System.out.println(res);
        }           
    }
} Main public static void main (String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            int n = sc.nextInt();
            int k = sc.nextInt();
            String s = sc.next();
            String res = "";
            char ch;            

            for (int i = 0; i < n; i++) {
                if (i == k - 1) {
                    ch = Character.toLowerCase(s.charAt(i));                
                }            
                else {
                    ch = s.charAt(i);
                }
                res += "" + ch;
            }
            System.out.println(res);
        }           
    } main {
        try (Scanner sc = new Scanner(System.in)) {
            int n = sc.nextInt();
            int k = sc.nextInt();
            String s = sc.next();
            String res = "";
            char ch;            

            for (int i = 0; i < n; i++) {
                if (i == k - 1) {
                    ch = Character.toLowerCase(s.charAt(i));                
                }            
                else {
                    ch = s.charAt(i);
                }
                res += "" + ch;
            }
            System.out.println(res);
        }           
    } try (Scanner sc = new Scanner(System.in)) {
            int n = sc.nextInt();
            int k = sc.nextInt();
            String s = sc.next();
            String res = "";
            char ch;            

            for (int i = 0; i < n; i++) {
                if (i == k - 1) {
                    ch = Character.toLowerCase(s.charAt(i));                
                }            
                else {
                    ch = s.charAt(i);
                }
                res += "" + ch;
            }
            System.out.println(res);
        } {
            int n = sc.nextInt();
            int k = sc.nextInt();
            String s = sc.next();
            String res = "";
            char ch;            

            for (int i = 0; i < n; i++) {
                if (i == k - 1) {
                    ch = Character.toLowerCase(s.charAt(i));                
                }            
                else {
                    ch = s.charAt(i);
                }
                res += "" + ch;
            }
            System.out.println(res);
        } Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) 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 res = ""; res "" char ch; ch for (int i = 0; i < n; i++) {
                if (i == k - 1) {
                    ch = Character.toLowerCase(s.charAt(i));                
                }            
                else {
                    ch = s.charAt(i);
                }
                res += "" + ch;
            } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
                if (i == k - 1) {
                    ch = Character.toLowerCase(s.charAt(i));                
                }            
                else {
                    ch = s.charAt(i);
                }
                res += "" + ch;
            } {
                if (i == k - 1) {
                    ch = Character.toLowerCase(s.charAt(i));                
                }            
                else {
                    ch = s.charAt(i);
                }
                res += "" + ch;
            } if (i == k - 1) {
                    ch = Character.toLowerCase(s.charAt(i));                
                }            
                else {
                    ch = s.charAt(i);
                } i == k - 1 i k - 1 k 1 {
                    ch = Character.toLowerCase(s.charAt(i));                
                } ch = Character.toLowerCase(s.charAt(i)) ch Character.toLowerCase(s.charAt(i)) Character.toLowerCase Character s.charAt(i) s.charAt s i {
                    ch = s.charAt(i);
                } ch = s.charAt(i) ch s.charAt(i) s.charAt s i res += "" + ch res "" + ch "" ch System.out.println(res) System.out.println System.out System System.out res String[] args args public class Main {
    public static void main (String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            int n = sc.nextInt();
            int k = sc.nextInt();
            String s = sc.next();
            String res = "";
            char ch;            

            for (int i = 0; i < n; i++) {
                if (i == k - 1) {
                    ch = Character.toLowerCase(s.charAt(i));                
                }            
                else {
                    ch = s.charAt(i);
                }
                res += "" + ch;
            }
            System.out.println(res);
        }           
    }
} public class Main {
    public static void main (String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            int n = sc.nextInt();
            int k = sc.nextInt();
            String s = sc.next();
            String res = "";
            char ch;            

            for (int i = 0; i < n; i++) {
                if (i == k - 1) {
                    ch = Character.toLowerCase(s.charAt(i));                
                }            
                else {
                    ch = s.charAt(i);
                }
                res += "" + ch;
            }
            System.out.println(res);
        }           
    }
} Main
import java.util.Scanner;
import java.lang.Character;

public class Main {
    public static void main (String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            int n = sc.nextInt();
            int k = sc.nextInt();
            String s = sc.next();
            String res = "";
            char ch;            

            for (int i = 0; i < n; i++) {
                if (i == k - 1) {
                    ch = Character.toLowerCase(s.charAt(i));                
                }            
                else {
                    ch = s.charAt(i);
                }
                res += "" + ch;
            }
            System.out.println(res);
        }           
    }
}