/*
* @Author Silviase(@silviasetitech)
* For ProCon
*/

import java.util.*;
import java.lang.*;
import java.math.*;

public class Main{    
    static int n;
    static int[] x = new int[n];
    static int[] y = new int[n];
    static int[] z = new int[n];
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int k = sc.nextInt();
        int n = sc.nextInt();

        String s = sc.next();
        for (int i = 0; i < s.length(); i++) {
            if (i == n-1) {
                String a = s.substring(n-1, n);
                a = a.toLowerCase();
                System.out.print(a);
            }else{
                System.out.print(s.charAt(i));
            }
        }
        System.out.println("");

        sc.close();
    }

} import java.util.*; util.* java import java.lang.*; lang.* java import java.math.*; math.* java public class Main{    
    static int n;
    static int[] x = new int[n];
    static int[] y = new int[n];
    static int[] z = new int[n];
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int k = sc.nextInt();
        int n = sc.nextInt();

        String s = sc.next();
        for (int i = 0; i < s.length(); i++) {
            if (i == n-1) {
                String a = s.substring(n-1, n);
                a = a.toLowerCase();
                System.out.print(a);
            }else{
                System.out.print(s.charAt(i));
            }
        }
        System.out.println("");

        sc.close();
    }

} Main static int n; n static int[] x = new int[n]; x new int[n] n static int[] y = new int[n]; y new int[n] n static int[] z = new int[n]; z new int[n] n public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int k = sc.nextInt();
        int n = sc.nextInt();

        String s = sc.next();
        for (int i = 0; i < s.length(); i++) {
            if (i == n-1) {
                String a = s.substring(n-1, n);
                a = a.toLowerCase();
                System.out.print(a);
            }else{
                System.out.print(s.charAt(i));
            }
        }
        System.out.println("");

        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);

        int k = sc.nextInt();
        int n = sc.nextInt();

        String s = sc.next();
        for (int i = 0; i < s.length(); i++) {
            if (i == n-1) {
                String a = s.substring(n-1, n);
                a = a.toLowerCase();
                System.out.print(a);
            }else{
                System.out.print(s.charAt(i));
            }
        }
        System.out.println("");

        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int k = sc.nextInt(); k sc.nextInt() sc.nextInt sc int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc String s = sc.next(); s sc.next() sc.next sc for (int i = 0; i < s.length(); i++) {
            if (i == n-1) {
                String a = s.substring(n-1, n);
                a = a.toLowerCase();
                System.out.print(a);
            }else{
                System.out.print(s.charAt(i));
            }
        } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
            if (i == n-1) {
                String a = s.substring(n-1, n);
                a = a.toLowerCase();
                System.out.print(a);
            }else{
                System.out.print(s.charAt(i));
            }
        } {
            if (i == n-1) {
                String a = s.substring(n-1, n);
                a = a.toLowerCase();
                System.out.print(a);
            }else{
                System.out.print(s.charAt(i));
            }
        } if (i == n-1) {
                String a = s.substring(n-1, n);
                a = a.toLowerCase();
                System.out.print(a);
            }else{
                System.out.print(s.charAt(i));
            } i == n-1 i n-1 n 1 {
                String a = s.substring(n-1, n);
                a = a.toLowerCase();
                System.out.print(a);
            } String a = s.substring(n-1, n); a s.substring(n-1, n) s.substring s n-1 n 1 n a = a.toLowerCase() a a.toLowerCase() a.toLowerCase a System.out.print(a) System.out.print System.out System System.out a {
                System.out.print(s.charAt(i));
            } System.out.print(s.charAt(i)) System.out.print System.out System System.out s.charAt(i) s.charAt s i System.out.println("") System.out.println System.out System System.out "" sc.close() sc.close sc String[] args args public class Main{    
    static int n;
    static int[] x = new int[n];
    static int[] y = new int[n];
    static int[] z = new int[n];
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int k = sc.nextInt();
        int n = sc.nextInt();

        String s = sc.next();
        for (int i = 0; i < s.length(); i++) {
            if (i == n-1) {
                String a = s.substring(n-1, n);
                a = a.toLowerCase();
                System.out.print(a);
            }else{
                System.out.print(s.charAt(i));
            }
        }
        System.out.println("");

        sc.close();
    }

} public class Main{    
    static int n;
    static int[] x = new int[n];
    static int[] y = new int[n];
    static int[] z = new int[n];
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int k = sc.nextInt();
        int n = sc.nextInt();

        String s = sc.next();
        for (int i = 0; i < s.length(); i++) {
            if (i == n-1) {
                String a = s.substring(n-1, n);
                a = a.toLowerCase();
                System.out.print(a);
            }else{
                System.out.print(s.charAt(i));
            }
        }
        System.out.println("");

        sc.close();
    }

} Main
/*
* @Author Silviase(@silviasetitech)
* For ProCon
*/

import java.util.*;
import java.lang.*;
import java.math.*;

public class Main{    
    static int n;
    static int[] x = new int[n];
    static int[] y = new int[n];
    static int[] z = new int[n];
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int k = sc.nextInt();
        int n = sc.nextInt();

        String s = sc.next();
        for (int i = 0; i < s.length(); i++) {
            if (i == n-1) {
                String a = s.substring(n-1, n);
                a = a.toLowerCase();
                System.out.print(a);
            }else{
                System.out.print(s.charAt(i));
            }
        }
        System.out.println("");

        sc.close();
    }

}
