import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayDeque;
import java.util.Arrays;
import java.util.Deque;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.IntStream;

public class Main {
    public static void main(String[] args) throws NumberFormatException, IOException {
        BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
        String[] line = stdin.readLine().split(" ");
        int n = Integer.parseInt(line[0]);
        int k = Integer.parseInt(line[1]);
        String s = stdin.readLine();
        
        char[] t = s.toCharArray();
        t[k - 1] = Character.toLowerCase(t[k - 1]);
        System.out.println(new String(t));
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.ArrayDeque; ArrayDeque java.util import java.util.Arrays; Arrays java.util import java.util.Deque; Deque java.util import java.util.HashMap; HashMap java.util import java.util.Map; Map java.util import java.util.Map.Entry; Entry java.util.Map import java.util.function.Function; Function java.util.function import java.util.stream.Collectors; Collectors java.util.stream import java.util.stream.IntStream; IntStream java.util.stream public class Main {
    public static void main(String[] args) throws NumberFormatException, IOException {
        BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
        String[] line = stdin.readLine().split(" ");
        int n = Integer.parseInt(line[0]);
        int k = Integer.parseInt(line[1]);
        String s = stdin.readLine();
        
        char[] t = s.toCharArray();
        t[k - 1] = Character.toLowerCase(t[k - 1]);
        System.out.println(new String(t));
    }
} Main public static void main(String[] args) throws NumberFormatException, IOException {
        BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
        String[] line = stdin.readLine().split(" ");
        int n = Integer.parseInt(line[0]);
        int k = Integer.parseInt(line[1]);
        String s = stdin.readLine();
        
        char[] t = s.toCharArray();
        t[k - 1] = Character.toLowerCase(t[k - 1]);
        System.out.println(new String(t));
    } main {
        BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
        String[] line = stdin.readLine().split(" ");
        int n = Integer.parseInt(line[0]);
        int k = Integer.parseInt(line[1]);
        String s = stdin.readLine();
        
        char[] t = s.toCharArray();
        t[k - 1] = Character.toLowerCase(t[k - 1]);
        System.out.println(new String(t));
    } BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in)); stdin new BufferedReader(new InputStreamReader(System.in)) String[] line = stdin.readLine().split(" "); line stdin.readLine().split(" ") stdin.readLine().split stdin.readLine() stdin.readLine stdin " " int n = Integer.parseInt(line[0]); n Integer.parseInt(line[0]) Integer.parseInt Integer line[0] line 0 int k = Integer.parseInt(line[1]); k Integer.parseInt(line[1]) Integer.parseInt Integer line[1] line 1 String s = stdin.readLine(); s stdin.readLine() stdin.readLine stdin char[] t = s.toCharArray(); t s.toCharArray() s.toCharArray s t[k - 1] = Character.toLowerCase(t[k - 1]) t[k - 1] t k - 1 k 1 Character.toLowerCase(t[k - 1]) Character.toLowerCase Character t[k - 1] t k - 1 k 1 System.out.println(new String(t)) System.out.println System.out System System.out new String(t) String[] args args public class Main {
    public static void main(String[] args) throws NumberFormatException, IOException {
        BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
        String[] line = stdin.readLine().split(" ");
        int n = Integer.parseInt(line[0]);
        int k = Integer.parseInt(line[1]);
        String s = stdin.readLine();
        
        char[] t = s.toCharArray();
        t[k - 1] = Character.toLowerCase(t[k - 1]);
        System.out.println(new String(t));
    }
} public class Main {
    public static void main(String[] args) throws NumberFormatException, IOException {
        BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
        String[] line = stdin.readLine().split(" ");
        int n = Integer.parseInt(line[0]);
        int k = Integer.parseInt(line[1]);
        String s = stdin.readLine();
        
        char[] t = s.toCharArray();
        t[k - 1] = Character.toLowerCase(t[k - 1]);
        System.out.println(new String(t));
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayDeque;
import java.util.Arrays;
import java.util.Deque;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.IntStream;

public class Main {
    public static void main(String[] args) throws NumberFormatException, IOException {
        BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
        String[] line = stdin.readLine().split(" ");
        int n = Integer.parseInt(line[0]);
        int k = Integer.parseInt(line[1]);
        String s = stdin.readLine();
        
        char[] t = s.toCharArray();
        t[k - 1] = Character.toLowerCase(t[k - 1]);
        System.out.println(new String(t));
    }
}
