import java.util.Scanner;

class Main {
    public static void main(final String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int k = scan.nextInt();
        String s = scan.next();
        char c = s.charAt(k-1);
        c += 32;
        String a = s.substring(0 ,k-1) + c + s.substring(k ,s.length());
        System.out.println(a);
    }
} import java.util.Scanner; Scanner java.util class Main {
    public static void main(final String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int k = scan.nextInt();
        String s = scan.next();
        char c = s.charAt(k-1);
        c += 32;
        String a = s.substring(0 ,k-1) + c + s.substring(k ,s.length());
        System.out.println(a);
    }
} Main public static void main(final String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int k = scan.nextInt();
        String s = scan.next();
        char c = s.charAt(k-1);
        c += 32;
        String a = s.substring(0 ,k-1) + c + s.substring(k ,s.length());
        System.out.println(a);
    } main {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int k = scan.nextInt();
        String s = scan.next();
        char c = s.charAt(k-1);
        c += 32;
        String a = s.substring(0 ,k-1) + c + s.substring(k ,s.length());
        System.out.println(a);
    } Scanner scan = new Scanner(System.in); scan new 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 char c = s.charAt(k-1); c s.charAt(k-1) s.charAt s k-1 k 1 c += 32 c 32 String a = s.substring(0 ,k-1) + c + s.substring(k ,s.length()); a s.substring(0 ,k-1) + c + s.substring(k ,s.length()) s.substring(0 ,k-1) + c + s.substring(k ,s.length()) s.substring(0 ,k-1) s.substring s 0 k-1 k 1 c s.substring(k ,s.length()) s.substring s k s.length() s.length s System.out.println(a) System.out.println System.out System System.out a final String[] args args
import java.util.Scanner;

class Main {
    public static void main(final String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int k = scan.nextInt();
        String s = scan.next();
        char c = s.charAt(k-1);
        c += 32;
        String a = s.substring(0 ,k-1) + c + s.substring(k ,s.length());
        System.out.println(a);
    }
}
