import java.util.*;

public class Main {
    
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        
        sc.nextInt();
        int n = sc.nextInt() -1;
        String target = sc.next();
        
        char c = (char)((int)target.charAt(n) - (int)('A'-'a'));
        char[] targetChars = target.toCharArray();
        targetChars[n] = c;
        
        System.out.println(String.valueOf(targetChars));
        
    }
} import java.util.*; util.* java public class Main {
    
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        
        sc.nextInt();
        int n = sc.nextInt() -1;
        String target = sc.next();
        
        char c = (char)((int)target.charAt(n) - (int)('A'-'a'));
        char[] targetChars = target.toCharArray();
        targetChars[n] = c;
        
        System.out.println(String.valueOf(targetChars));
        
    }
} Main public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        
        sc.nextInt();
        int n = sc.nextInt() -1;
        String target = sc.next();
        
        char c = (char)((int)target.charAt(n) - (int)('A'-'a'));
        char[] targetChars = target.toCharArray();
        targetChars[n] = c;
        
        System.out.println(String.valueOf(targetChars));
        
    } main {
        
        Scanner sc = new Scanner(System.in);
        
        sc.nextInt();
        int n = sc.nextInt() -1;
        String target = sc.next();
        
        char c = (char)((int)target.charAt(n) - (int)('A'-'a'));
        char[] targetChars = target.toCharArray();
        targetChars[n] = c;
        
        System.out.println(String.valueOf(targetChars));
        
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) sc.nextInt() sc.nextInt sc int n = sc.nextInt() -1; n sc.nextInt() -1 sc.nextInt() sc.nextInt sc 1 String target = sc.next(); target sc.next() sc.next sc char c = (char)((int)target.charAt(n) - (int)('A'-'a')); c (char)((int)target.charAt(n) - (int)('A'-'a')) (int)target.charAt(n) target.charAt target n (int)('A'-'a') 'A' 'a' char[] targetChars = target.toCharArray(); targetChars target.toCharArray() target.toCharArray target targetChars[n] = c targetChars[n] targetChars n c System.out.println(String.valueOf(targetChars)) System.out.println System.out System System.out String.valueOf(targetChars) String.valueOf String targetChars String[] args args public class Main {
    
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        
        sc.nextInt();
        int n = sc.nextInt() -1;
        String target = sc.next();
        
        char c = (char)((int)target.charAt(n) - (int)('A'-'a'));
        char[] targetChars = target.toCharArray();
        targetChars[n] = c;
        
        System.out.println(String.valueOf(targetChars));
        
    }
} public class Main {
    
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        
        sc.nextInt();
        int n = sc.nextInt() -1;
        String target = sc.next();
        
        char c = (char)((int)target.charAt(n) - (int)('A'-'a'));
        char[] targetChars = target.toCharArray();
        targetChars[n] = c;
        
        System.out.println(String.valueOf(targetChars));
        
    }
} Main
import java.util.*;

public class Main {
    
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        
        sc.nextInt();
        int n = sc.nextInt() -1;
        String target = sc.next();
        
        char c = (char)((int)target.charAt(n) - (int)('A'-'a'));
        char[] targetChars = target.toCharArray();
        targetChars[n] = c;
        
        System.out.println(String.valueOf(targetChars));
        
    }
}
