import java.util.Scanner;

class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int strLen = sc.nextInt();
        int index = sc.nextInt();

        String str = sc.next();
        String small;
        switch(str.charAt(index-1)){
            case 'A':
            small = "a";
            break;
            case 'B':
            small = "b";
            break;
            case 'C':
            small = "c";
            break;
            default:
            small = "error";

        }

        StringBuilder sb = new StringBuilder();
        sb.append(str.substring(0, index-1));
        sb.append(small);
        sb.append(str.substring(index));

        System.out.println(sb.toString());
    }
} import java.util.Scanner; Scanner java.util class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int strLen = sc.nextInt();
        int index = sc.nextInt();

        String str = sc.next();
        String small;
        switch(str.charAt(index-1)){
            case 'A':
            small = "a";
            break;
            case 'B':
            small = "b";
            break;
            case 'C':
            small = "c";
            break;
            default:
            small = "error";

        }

        StringBuilder sb = new StringBuilder();
        sb.append(str.substring(0, index-1));
        sb.append(small);
        sb.append(str.substring(index));

        System.out.println(sb.toString());
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int strLen = sc.nextInt();
        int index = sc.nextInt();

        String str = sc.next();
        String small;
        switch(str.charAt(index-1)){
            case 'A':
            small = "a";
            break;
            case 'B':
            small = "b";
            break;
            case 'C':
            small = "c";
            break;
            default:
            small = "error";

        }

        StringBuilder sb = new StringBuilder();
        sb.append(str.substring(0, index-1));
        sb.append(small);
        sb.append(str.substring(index));

        System.out.println(sb.toString());
    } main {
        Scanner sc = new Scanner(System.in);
        int strLen = sc.nextInt();
        int index = sc.nextInt();

        String str = sc.next();
        String small;
        switch(str.charAt(index-1)){
            case 'A':
            small = "a";
            break;
            case 'B':
            small = "b";
            break;
            case 'C':
            small = "c";
            break;
            default:
            small = "error";

        }

        StringBuilder sb = new StringBuilder();
        sb.append(str.substring(0, index-1));
        sb.append(small);
        sb.append(str.substring(index));

        System.out.println(sb.toString());
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int strLen = sc.nextInt(); strLen sc.nextInt() sc.nextInt sc int index = sc.nextInt(); index sc.nextInt() sc.nextInt sc String str = sc.next(); str sc.next() sc.next sc String small; small switch(str.charAt(index-1)){
            case 'A':
            small = "a";
            break;
            case 'B':
            small = "b";
            break;
            case 'C':
            small = "c";
            break;
            default:
            small = "error";

        } str.charAt(index-1) str.charAt str index-1 index 1 case 'A': 'A' case 'A': small = "a" small "a" break; case 'B': 'B' case 'B': small = "b" small "b" break; case 'C': 'C' case 'C': small = "c" small "c" break; default: default: small = "error" small "error" StringBuilder sb = new StringBuilder(); sb new StringBuilder() sb.append(str.substring(0, index-1)) sb.append sb str.substring(0, index-1) str.substring str 0 index-1 index 1 sb.append(small) sb.append sb small sb.append(str.substring(index)) sb.append sb str.substring(index) str.substring str index System.out.println(sb.toString()) System.out.println System.out System System.out sb.toString() sb.toString sb String[] args args
import java.util.Scanner;

class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int strLen = sc.nextInt();
        int index = sc.nextInt();

        String str = sc.next();
        String small;
        switch(str.charAt(index-1)){
            case 'A':
            small = "a";
            break;
            case 'B':
            small = "b";
            break;
            case 'C':
            small = "c";
            break;
            default:
            small = "error";

        }

        StringBuilder sb = new StringBuilder();
        sb.append(str.substring(0, index-1));
        sb.append(small);
        sb.append(str.substring(index));

        System.out.println(sb.toString());
    }
}