import java.util.Scanner;

class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int K = sc.nextInt();
        String S = sc.next();

        char moji[] =S.toCharArray();
        switch(moji[K - 1]) {
            case 'A':
                moji[K - 1] = 'a';
                break;
            case 'B':
                moji[K - 1] = 'b';
                break;
            case 'C':
                moji[K -1 ] = 'c';
        }
        for(int i = 0;i < N;i++){
            System.out.print(moji[i]);
        }
    }
} import java.util.Scanner; Scanner java.util class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int K = sc.nextInt();
        String S = sc.next();

        char moji[] =S.toCharArray();
        switch(moji[K - 1]) {
            case 'A':
                moji[K - 1] = 'a';
                break;
            case 'B':
                moji[K - 1] = 'b';
                break;
            case 'C':
                moji[K -1 ] = 'c';
        }
        for(int i = 0;i < N;i++){
            System.out.print(moji[i]);
        }
    }
} Main public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int K = sc.nextInt();
        String S = sc.next();

        char moji[] =S.toCharArray();
        switch(moji[K - 1]) {
            case 'A':
                moji[K - 1] = 'a';
                break;
            case 'B':
                moji[K - 1] = 'b';
                break;
            case 'C':
                moji[K -1 ] = 'c';
        }
        for(int i = 0;i < N;i++){
            System.out.print(moji[i]);
        }
    } main {

        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int K = sc.nextInt();
        String S = sc.next();

        char moji[] =S.toCharArray();
        switch(moji[K - 1]) {
            case 'A':
                moji[K - 1] = 'a';
                break;
            case 'B':
                moji[K - 1] = 'b';
                break;
            case 'C':
                moji[K -1 ] = 'c';
        }
        for(int i = 0;i < N;i++){
            System.out.print(moji[i]);
        }
    } Scanner sc = new Scanner(System.in); sc 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 char moji[] =S.toCharArray(); moji S.toCharArray() S.toCharArray S switch(moji[K - 1]) {
            case 'A':
                moji[K - 1] = 'a';
                break;
            case 'B':
                moji[K - 1] = 'b';
                break;
            case 'C':
                moji[K -1 ] = 'c';
        } moji[K - 1] moji K - 1 K 1 case 'A': 'A' case 'A': moji[K - 1] = 'a' moji[K - 1] moji K - 1 K 1 'a' break; case 'B': 'B' case 'B': moji[K - 1] = 'b' moji[K - 1] moji K - 1 K 1 'b' break; case 'C': 'C' case 'C': moji[K -1 ] = 'c' moji[K -1 ] moji K -1 K 1 'c' for(int i = 0;i < N;i++){
            System.out.print(moji[i]);
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            System.out.print(moji[i]);
        } {
            System.out.print(moji[i]);
        } System.out.print(moji[i]) System.out.print System.out System System.out moji[i] moji i String[] args args
import java.util.Scanner;

class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int K = sc.nextInt();
        String S = sc.next();

        char moji[] =S.toCharArray();
        switch(moji[K - 1]) {
            case 'A':
                moji[K - 1] = 'a';
                break;
            case 'B':
                moji[K - 1] = 'b';
                break;
            case 'C':
                moji[K -1 ] = 'c';
        }
        for(int i = 0;i < N;i++){
            System.out.print(moji[i]);
        }
    }
}
