import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String[] in = br.readLine().split(" ");
        int k = Integer.parseInt(in[1]);
        char[] s = br.readLine().toCharArray();
        s[k - 1] = (char) (s[k - 1] - 'A' + 'a');
        System.out.println(String.valueOf(s));

        br.close();
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.IOException; IOException java.io public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String[] in = br.readLine().split(" ");
        int k = Integer.parseInt(in[1]);
        char[] s = br.readLine().toCharArray();
        s[k - 1] = (char) (s[k - 1] - 'A' + 'a');
        System.out.println(String.valueOf(s));

        br.close();
    }
} Main public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String[] in = br.readLine().split(" ");
        int k = Integer.parseInt(in[1]);
        char[] s = br.readLine().toCharArray();
        s[k - 1] = (char) (s[k - 1] - 'A' + 'a');
        System.out.println(String.valueOf(s));

        br.close();
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String[] in = br.readLine().split(" ");
        int k = Integer.parseInt(in[1]);
        char[] s = br.readLine().toCharArray();
        s[k - 1] = (char) (s[k - 1] - 'A' + 'a');
        System.out.println(String.valueOf(s));

        br.close();
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] in = br.readLine().split(" "); in br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int k = Integer.parseInt(in[1]); k Integer.parseInt(in[1]) Integer.parseInt Integer in[1] in 1 char[] s = br.readLine().toCharArray(); s br.readLine().toCharArray() br.readLine().toCharArray br.readLine() br.readLine br s[k - 1] = (char) (s[k - 1] - 'A' + 'a') s[k - 1] s k - 1 k 1 (char) (s[k - 1] - 'A' + 'a') s[k - 1] - 'A' s[k - 1] s k - 1 k 1 'A' 'a' System.out.println(String.valueOf(s)) System.out.println System.out System System.out String.valueOf(s) String.valueOf String s br.close() br.close br String[] args args public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String[] in = br.readLine().split(" ");
        int k = Integer.parseInt(in[1]);
        char[] s = br.readLine().toCharArray();
        s[k - 1] = (char) (s[k - 1] - 'A' + 'a');
        System.out.println(String.valueOf(s));

        br.close();
    }
} public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String[] in = br.readLine().split(" ");
        int k = Integer.parseInt(in[1]);
        char[] s = br.readLine().toCharArray();
        s[k - 1] = (char) (s[k - 1] - 'A' + 'a');
        System.out.println(String.valueOf(s));

        br.close();
    }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String[] in = br.readLine().split(" ");
        int k = Integer.parseInt(in[1]);
        char[] s = br.readLine().toCharArray();
        s[k - 1] = (char) (s[k - 1] - 'A' + 'a');
        System.out.println(String.valueOf(s));

        br.close();
    }
}