import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int k = Integer.parseInt(sc.next());
        String s = sc.next();
        char[] charArray = s.toCharArray();

        if (charArray[k - 1] == 'A') {
            charArray[k - 1] = 'a';
        } else if (charArray[k - 1] == 'B') {
            charArray[k - 1] = 'b';
        } else {
            charArray[k - 1] = 'c';
        }

        System.out.println(String.valueOf(charArray));
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int k = Integer.parseInt(sc.next());
        String s = sc.next();
        char[] charArray = s.toCharArray();

        if (charArray[k - 1] == 'A') {
            charArray[k - 1] = 'a';
        } else if (charArray[k - 1] == 'B') {
            charArray[k - 1] = 'b';
        } else {
            charArray[k - 1] = 'c';
        }

        System.out.println(String.valueOf(charArray));
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int k = Integer.parseInt(sc.next());
        String s = sc.next();
        char[] charArray = s.toCharArray();

        if (charArray[k - 1] == 'A') {
            charArray[k - 1] = 'a';
        } else if (charArray[k - 1] == 'B') {
            charArray[k - 1] = 'b';
        } else {
            charArray[k - 1] = 'c';
        }

        System.out.println(String.valueOf(charArray));
    } main {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int k = Integer.parseInt(sc.next());
        String s = sc.next();
        char[] charArray = s.toCharArray();

        if (charArray[k - 1] == 'A') {
            charArray[k - 1] = 'a';
        } else if (charArray[k - 1] == 'B') {
            charArray[k - 1] = 'b';
        } else {
            charArray[k - 1] = 'c';
        }

        System.out.println(String.valueOf(charArray));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int k = Integer.parseInt(sc.next()); k Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc String s = sc.next(); s sc.next() sc.next sc char[] charArray = s.toCharArray(); charArray s.toCharArray() s.toCharArray s if (charArray[k - 1] == 'A') {
            charArray[k - 1] = 'a';
        } else if (charArray[k - 1] == 'B') {
            charArray[k - 1] = 'b';
        } else {
            charArray[k - 1] = 'c';
        } charArray[k - 1] == 'A' charArray[k - 1] charArray k - 1 k 1 'A' {
            charArray[k - 1] = 'a';
        } charArray[k - 1] = 'a' charArray[k - 1] charArray k - 1 k 1 'a' if (charArray[k - 1] == 'B') {
            charArray[k - 1] = 'b';
        } else {
            charArray[k - 1] = 'c';
        } charArray[k - 1] == 'B' charArray[k - 1] charArray k - 1 k 1 'B' {
            charArray[k - 1] = 'b';
        } charArray[k - 1] = 'b' charArray[k - 1] charArray k - 1 k 1 'b' {
            charArray[k - 1] = 'c';
        } charArray[k - 1] = 'c' charArray[k - 1] charArray k - 1 k 1 'c' System.out.println(String.valueOf(charArray)) System.out.println System.out System System.out String.valueOf(charArray) String.valueOf String charArray String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int k = Integer.parseInt(sc.next());
        String s = sc.next();
        char[] charArray = s.toCharArray();

        if (charArray[k - 1] == 'A') {
            charArray[k - 1] = 'a';
        } else if (charArray[k - 1] == 'B') {
            charArray[k - 1] = 'b';
        } else {
            charArray[k - 1] = 'c';
        }

        System.out.println(String.valueOf(charArray));
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int k = Integer.parseInt(sc.next());
        String s = sc.next();
        char[] charArray = s.toCharArray();

        if (charArray[k - 1] == 'A') {
            charArray[k - 1] = 'a';
        } else if (charArray[k - 1] == 'B') {
            charArray[k - 1] = 'b';
        } else {
            charArray[k - 1] = 'c';
        }

        System.out.println(String.valueOf(charArray));
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int k = Integer.parseInt(sc.next());
        String s = sc.next();
        char[] charArray = s.toCharArray();

        if (charArray[k - 1] == 'A') {
            charArray[k - 1] = 'a';
        } else if (charArray[k - 1] == 'B') {
            charArray[k - 1] = 'b';
        } else {
            charArray[k - 1] = 'c';
        }

        System.out.println(String.valueOf(charArray));
    }
}
