import java.util.*;
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        String s = sc.next();
        char array[] = new char[n];

        for(int i = 0; i<n;i++){
            array[i] = s.charAt(i);
        }

        array[k-1] = Character.toLowerCase(array[k-1]); 
       // System.out.println(array[k-1]);



        for(int i = 0;i<n;i++){
            System.out.print(array[i]);
        }
        System.out.println("");
    }

} import java.util.*; util.* java public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        String s = sc.next();
        char array[] = new char[n];

        for(int i = 0; i<n;i++){
            array[i] = s.charAt(i);
        }

        array[k-1] = Character.toLowerCase(array[k-1]); 
       // System.out.println(array[k-1]);



        for(int i = 0;i<n;i++){
            System.out.print(array[i]);
        }
        System.out.println("");
    }

} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        String s = sc.next();
        char array[] = new char[n];

        for(int i = 0; i<n;i++){
            array[i] = s.charAt(i);
        }

        array[k-1] = Character.toLowerCase(array[k-1]); 
       // System.out.println(array[k-1]);



        for(int i = 0;i<n;i++){
            System.out.print(array[i]);
        }
        System.out.println("");
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        String s = sc.next();
        char array[] = new char[n];

        for(int i = 0; i<n;i++){
            array[i] = s.charAt(i);
        }

        array[k-1] = Character.toLowerCase(array[k-1]); 
       // System.out.println(array[k-1]);



        for(int i = 0;i<n;i++){
            System.out.print(array[i]);
        }
        System.out.println("");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int k = sc.nextInt(); k sc.nextInt() sc.nextInt sc String s = sc.next(); s sc.next() sc.next sc char array[] = new char[n]; array new char[n] n for(int i = 0; i<n;i++){
            array[i] = s.charAt(i);
        } int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
            array[i] = s.charAt(i);
        } {
            array[i] = s.charAt(i);
        } array[i] = s.charAt(i) array[i] array i s.charAt(i) s.charAt s i array[k-1] = Character.toLowerCase(array[k-1]) array[k-1] array k-1 k 1 Character.toLowerCase(array[k-1]) Character.toLowerCase Character array[k-1] array k-1 k 1 for(int i = 0;i<n;i++){
            System.out.print(array[i]);
        } int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
            System.out.print(array[i]);
        } {
            System.out.print(array[i]);
        } System.out.print(array[i]) System.out.print System.out System System.out array[i] array i System.out.println("") System.out.println System.out System System.out "" String[] args args public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        String s = sc.next();
        char array[] = new char[n];

        for(int i = 0; i<n;i++){
            array[i] = s.charAt(i);
        }

        array[k-1] = Character.toLowerCase(array[k-1]); 
       // System.out.println(array[k-1]);



        for(int i = 0;i<n;i++){
            System.out.print(array[i]);
        }
        System.out.println("");
    }

} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        String s = sc.next();
        char array[] = new char[n];

        for(int i = 0; i<n;i++){
            array[i] = s.charAt(i);
        }

        array[k-1] = Character.toLowerCase(array[k-1]); 
       // System.out.println(array[k-1]);



        for(int i = 0;i<n;i++){
            System.out.print(array[i]);
        }
        System.out.println("");
    }

} Main
import java.util.*;
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        String s = sc.next();
        char array[] = new char[n];

        for(int i = 0; i<n;i++){
            array[i] = s.charAt(i);
        }

        array[k-1] = Character.toLowerCase(array[k-1]); 
       // System.out.println(array[k-1]);



        for(int i = 0;i<n;i++){
            System.out.print(array[i]);
        }
        System.out.println("");
    }

}
