import 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();
        String mae = S.substring(0,k-1);
        String usiro = S.substring(k);
        char A = S.charAt(k-1);
        if(A == 'A'){
          A = 'a';
        }else if (A == 'B'){
          A = 'b';

        }else{
          A = 'c';
        }
        System.out.println(mae + A + usiro);
    }
} import java.util.*; util.* java 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();
        String mae = S.substring(0,k-1);
        String usiro = S.substring(k);
        char A = S.charAt(k-1);
        if(A == 'A'){
          A = 'a';
        }else if (A == 'B'){
          A = 'b';

        }else{
          A = 'c';
        }
        System.out.println(mae + A + usiro);
    }
} 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();
        String mae = S.substring(0,k-1);
        String usiro = S.substring(k);
        char A = S.charAt(k-1);
        if(A == 'A'){
          A = 'a';
        }else if (A == 'B'){
          A = 'b';

        }else{
          A = 'c';
        }
        System.out.println(mae + A + usiro);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        String S = sc.next();
        String mae = S.substring(0,k-1);
        String usiro = S.substring(k);
        char A = S.charAt(k-1);
        if(A == 'A'){
          A = 'a';
        }else if (A == 'B'){
          A = 'b';

        }else{
          A = 'c';
        }
        System.out.println(mae + A + usiro);
    } 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 String mae = S.substring(0,k-1); mae S.substring(0,k-1) S.substring S 0 k-1 k 1 String usiro = S.substring(k); usiro S.substring(k) S.substring S k char A = S.charAt(k-1); A S.charAt(k-1) S.charAt S k-1 k 1 if(A == 'A'){
          A = 'a';
        }else if (A == 'B'){
          A = 'b';

        }else{
          A = 'c';
        } A == 'A' A 'A' {
          A = 'a';
        } A = 'a' A 'a' if (A == 'B'){
          A = 'b';

        }else{
          A = 'c';
        } A == 'B' A 'B' {
          A = 'b';

        } A = 'b' A 'b' {
          A = 'c';
        } A = 'c' A 'c' System.out.println(mae + A + usiro) System.out.println System.out System System.out mae + A + usiro mae + A + usiro mae A usiro String[] args args
import 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();
        String mae = S.substring(0,k-1);
        String usiro = S.substring(k);
        char A = S.charAt(k-1);
        if(A == 'A'){
          A = 'a';
        }else if (A == 'B'){
          A = 'b';

        }else{
          A = 'c';
        }
        System.out.println(mae + A + usiro);
    }
}
