import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int K = scanner.nextInt();
        K--;
        String str = scanner.next();

        StringBuilder sb = new StringBuilder(str);

        if(str.charAt(K) == 'A'){
            sb.setCharAt(K, 'a');
        }else if(str.charAt(K) == 'B'){
            sb.setCharAt(K, 'b');
        }else if(str.charAt(K) == 'C'){
            sb.setCharAt(K, 'c');
        }

        System.out.println(sb);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int K = scanner.nextInt();
        K--;
        String str = scanner.next();

        StringBuilder sb = new StringBuilder(str);

        if(str.charAt(K) == 'A'){
            sb.setCharAt(K, 'a');
        }else if(str.charAt(K) == 'B'){
            sb.setCharAt(K, 'b');
        }else if(str.charAt(K) == 'C'){
            sb.setCharAt(K, 'c');
        }

        System.out.println(sb);
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int K = scanner.nextInt();
        K--;
        String str = scanner.next();

        StringBuilder sb = new StringBuilder(str);

        if(str.charAt(K) == 'A'){
            sb.setCharAt(K, 'a');
        }else if(str.charAt(K) == 'B'){
            sb.setCharAt(K, 'b');
        }else if(str.charAt(K) == 'C'){
            sb.setCharAt(K, 'c');
        }

        System.out.println(sb);
    } main {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int K = scanner.nextInt();
        K--;
        String str = scanner.next();

        StringBuilder sb = new StringBuilder(str);

        if(str.charAt(K) == 'A'){
            sb.setCharAt(K, 'a');
        }else if(str.charAt(K) == 'B'){
            sb.setCharAt(K, 'b');
        }else if(str.charAt(K) == 'C'){
            sb.setCharAt(K, 'c');
        }

        System.out.println(sb);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner int K = scanner.nextInt(); K scanner.nextInt() scanner.nextInt scanner K-- K String str = scanner.next(); str scanner.next() scanner.next scanner StringBuilder sb = new StringBuilder(str); sb new StringBuilder(str) if(str.charAt(K) == 'A'){
            sb.setCharAt(K, 'a');
        }else if(str.charAt(K) == 'B'){
            sb.setCharAt(K, 'b');
        }else if(str.charAt(K) == 'C'){
            sb.setCharAt(K, 'c');
        } str.charAt(K) == 'A' str.charAt(K) str.charAt str K 'A' {
            sb.setCharAt(K, 'a');
        } sb.setCharAt(K, 'a') sb.setCharAt sb K 'a' if(str.charAt(K) == 'B'){
            sb.setCharAt(K, 'b');
        }else if(str.charAt(K) == 'C'){
            sb.setCharAt(K, 'c');
        } str.charAt(K) == 'B' str.charAt(K) str.charAt str K 'B' {
            sb.setCharAt(K, 'b');
        } sb.setCharAt(K, 'b') sb.setCharAt sb K 'b' if(str.charAt(K) == 'C'){
            sb.setCharAt(K, 'c');
        } str.charAt(K) == 'C' str.charAt(K) str.charAt str K 'C' {
            sb.setCharAt(K, 'c');
        } sb.setCharAt(K, 'c') sb.setCharAt sb K 'c' System.out.println(sb) System.out.println System.out System System.out sb String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int K = scanner.nextInt();
        K--;
        String str = scanner.next();

        StringBuilder sb = new StringBuilder(str);

        if(str.charAt(K) == 'A'){
            sb.setCharAt(K, 'a');
        }else if(str.charAt(K) == 'B'){
            sb.setCharAt(K, 'b');
        }else if(str.charAt(K) == 'C'){
            sb.setCharAt(K, 'c');
        }

        System.out.println(sb);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int K = scanner.nextInt();
        K--;
        String str = scanner.next();

        StringBuilder sb = new StringBuilder(str);

        if(str.charAt(K) == 'A'){
            sb.setCharAt(K, 'a');
        }else if(str.charAt(K) == 'B'){
            sb.setCharAt(K, 'b');
        }else if(str.charAt(K) == 'C'){
            sb.setCharAt(K, 'c');
        }

        System.out.println(sb);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int K = scanner.nextInt();
        K--;
        String str = scanner.next();

        StringBuilder sb = new StringBuilder(str);

        if(str.charAt(K) == 'A'){
            sb.setCharAt(K, 'a');
        }else if(str.charAt(K) == 'B'){
            sb.setCharAt(K, 'b');
        }else if(str.charAt(K) == 'C'){
            sb.setCharAt(K, 'c');
        }

        System.out.println(sb);
    }
}
