import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner scan = new java.util.Scanner(System.in);
        int n = scan.nextInt();
        int k = scan.nextInt();
        String s = scan.next();
        for(int i = 1; i < s.length() + 1; i++){
            if(i == k){
                if(s.charAt(k - 1) == 'A'){
                    System.out.print('a');
                }else if(s.charAt(k - 1) == 'B'){
                    System.out.print('b');
                }else{
                    System.out.print('c');
                }
            }else{
                System.out.print(s.charAt(i - 1));
            }
        }
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args){
        Scanner scan = new java.util.Scanner(System.in);
        int n = scan.nextInt();
        int k = scan.nextInt();
        String s = scan.next();
        for(int i = 1; i < s.length() + 1; i++){
            if(i == k){
                if(s.charAt(k - 1) == 'A'){
                    System.out.print('a');
                }else if(s.charAt(k - 1) == 'B'){
                    System.out.print('b');
                }else{
                    System.out.print('c');
                }
            }else{
                System.out.print(s.charAt(i - 1));
            }
        }
    }
} Main public static void main(String[] args){
        Scanner scan = new java.util.Scanner(System.in);
        int n = scan.nextInt();
        int k = scan.nextInt();
        String s = scan.next();
        for(int i = 1; i < s.length() + 1; i++){
            if(i == k){
                if(s.charAt(k - 1) == 'A'){
                    System.out.print('a');
                }else if(s.charAt(k - 1) == 'B'){
                    System.out.print('b');
                }else{
                    System.out.print('c');
                }
            }else{
                System.out.print(s.charAt(i - 1));
            }
        }
    } main {
        Scanner scan = new java.util.Scanner(System.in);
        int n = scan.nextInt();
        int k = scan.nextInt();
        String s = scan.next();
        for(int i = 1; i < s.length() + 1; i++){
            if(i == k){
                if(s.charAt(k - 1) == 'A'){
                    System.out.print('a');
                }else if(s.charAt(k - 1) == 'B'){
                    System.out.print('b');
                }else{
                    System.out.print('c');
                }
            }else{
                System.out.print(s.charAt(i - 1));
            }
        }
    } Scanner scan = new java.util.Scanner(System.in); scan new java.util.Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int k = scan.nextInt(); k scan.nextInt() scan.nextInt scan String s = scan.next(); s scan.next() scan.next scan for(int i = 1; i < s.length() + 1; i++){
            if(i == k){
                if(s.charAt(k - 1) == 'A'){
                    System.out.print('a');
                }else if(s.charAt(k - 1) == 'B'){
                    System.out.print('b');
                }else{
                    System.out.print('c');
                }
            }else{
                System.out.print(s.charAt(i - 1));
            }
        } int i = 1; int i = 1; i 1 i < s.length() + 1 i s.length() + 1 s.length() s.length s 1 i++ i++ i {
            if(i == k){
                if(s.charAt(k - 1) == 'A'){
                    System.out.print('a');
                }else if(s.charAt(k - 1) == 'B'){
                    System.out.print('b');
                }else{
                    System.out.print('c');
                }
            }else{
                System.out.print(s.charAt(i - 1));
            }
        } {
            if(i == k){
                if(s.charAt(k - 1) == 'A'){
                    System.out.print('a');
                }else if(s.charAt(k - 1) == 'B'){
                    System.out.print('b');
                }else{
                    System.out.print('c');
                }
            }else{
                System.out.print(s.charAt(i - 1));
            }
        } if(i == k){
                if(s.charAt(k - 1) == 'A'){
                    System.out.print('a');
                }else if(s.charAt(k - 1) == 'B'){
                    System.out.print('b');
                }else{
                    System.out.print('c');
                }
            }else{
                System.out.print(s.charAt(i - 1));
            } i == k i k {
                if(s.charAt(k - 1) == 'A'){
                    System.out.print('a');
                }else if(s.charAt(k - 1) == 'B'){
                    System.out.print('b');
                }else{
                    System.out.print('c');
                }
            } if(s.charAt(k - 1) == 'A'){
                    System.out.print('a');
                }else if(s.charAt(k - 1) == 'B'){
                    System.out.print('b');
                }else{
                    System.out.print('c');
                } s.charAt(k - 1) == 'A' s.charAt(k - 1) s.charAt s k - 1 k 1 'A' {
                    System.out.print('a');
                } System.out.print('a') System.out.print System.out System System.out 'a' if(s.charAt(k - 1) == 'B'){
                    System.out.print('b');
                }else{
                    System.out.print('c');
                } s.charAt(k - 1) == 'B' s.charAt(k - 1) s.charAt s k - 1 k 1 'B' {
                    System.out.print('b');
                } System.out.print('b') System.out.print System.out System System.out 'b' {
                    System.out.print('c');
                } System.out.print('c') System.out.print System.out System System.out 'c' {
                System.out.print(s.charAt(i - 1));
            } System.out.print(s.charAt(i - 1)) System.out.print System.out System System.out s.charAt(i - 1) s.charAt s i - 1 i 1 String[] args args public class Main{
    public static void main(String[] args){
        Scanner scan = new java.util.Scanner(System.in);
        int n = scan.nextInt();
        int k = scan.nextInt();
        String s = scan.next();
        for(int i = 1; i < s.length() + 1; i++){
            if(i == k){
                if(s.charAt(k - 1) == 'A'){
                    System.out.print('a');
                }else if(s.charAt(k - 1) == 'B'){
                    System.out.print('b');
                }else{
                    System.out.print('c');
                }
            }else{
                System.out.print(s.charAt(i - 1));
            }
        }
    }
} public class Main{
    public static void main(String[] args){
        Scanner scan = new java.util.Scanner(System.in);
        int n = scan.nextInt();
        int k = scan.nextInt();
        String s = scan.next();
        for(int i = 1; i < s.length() + 1; i++){
            if(i == k){
                if(s.charAt(k - 1) == 'A'){
                    System.out.print('a');
                }else if(s.charAt(k - 1) == 'B'){
                    System.out.print('b');
                }else{
                    System.out.print('c');
                }
            }else{
                System.out.print(s.charAt(i - 1));
            }
        }
    }
} Main
import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner scan = new java.util.Scanner(System.in);
        int n = scan.nextInt();
        int k = scan.nextInt();
        String s = scan.next();
        for(int i = 1; i < s.length() + 1; i++){
            if(i == k){
                if(s.charAt(k - 1) == 'A'){
                    System.out.print('a');
                }else if(s.charAt(k - 1) == 'B'){
                    System.out.print('b');
                }else{
                    System.out.print('c');
                }
            }else{
                System.out.print(s.charAt(i - 1));
            }
        }
    }
}