        import java.util.Scanner;

public class Main {
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int l=sc.nextInt();
        int o=sc.nextInt();
        String s=sc.next();
        String tmp=String.valueOf(s.charAt(o-1));
        tmp=tmp.toLowerCase();
        String s2=s.substring(0,o-1)+tmp+s.substring(o);
        System.out.println(s2);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int l=sc.nextInt();
        int o=sc.nextInt();
        String s=sc.next();
        String tmp=String.valueOf(s.charAt(o-1));
        tmp=tmp.toLowerCase();
        String s2=s.substring(0,o-1)+tmp+s.substring(o);
        System.out.println(s2);
    }
} Main public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int l=sc.nextInt();
        int o=sc.nextInt();
        String s=sc.next();
        String tmp=String.valueOf(s.charAt(o-1));
        tmp=tmp.toLowerCase();
        String s2=s.substring(0,o-1)+tmp+s.substring(o);
        System.out.println(s2);
    } main {
        Scanner sc=new Scanner(System.in);
        int l=sc.nextInt();
        int o=sc.nextInt();
        String s=sc.next();
        String tmp=String.valueOf(s.charAt(o-1));
        tmp=tmp.toLowerCase();
        String s2=s.substring(0,o-1)+tmp+s.substring(o);
        System.out.println(s2);
    } Scanner sc=new Scanner(System.in); sc new Scanner(System.in) int l=sc.nextInt(); l sc.nextInt() sc.nextInt sc int o=sc.nextInt(); o sc.nextInt() sc.nextInt sc String s=sc.next(); s sc.next() sc.next sc String tmp=String.valueOf(s.charAt(o-1)); tmp String.valueOf(s.charAt(o-1)) String.valueOf String s.charAt(o-1) s.charAt s o-1 o 1 tmp=tmp.toLowerCase() tmp tmp.toLowerCase() tmp.toLowerCase tmp String s2=s.substring(0,o-1)+tmp+s.substring(o); s2 s.substring(0,o-1)+tmp+s.substring(o) s.substring(0,o-1)+tmp+s.substring(o) s.substring(0,o-1) s.substring s 0 o-1 o 1 tmp s.substring(o) s.substring s o System.out.println(s2) System.out.println System.out System System.out s2 String[] args args public class Main {
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int l=sc.nextInt();
        int o=sc.nextInt();
        String s=sc.next();
        String tmp=String.valueOf(s.charAt(o-1));
        tmp=tmp.toLowerCase();
        String s2=s.substring(0,o-1)+tmp+s.substring(o);
        System.out.println(s2);
    }
} public class Main {
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int l=sc.nextInt();
        int o=sc.nextInt();
        String s=sc.next();
        String tmp=String.valueOf(s.charAt(o-1));
        tmp=tmp.toLowerCase();
        String s2=s.substring(0,o-1)+tmp+s.substring(o);
        System.out.println(s2);
    }
} Main
        import java.util.Scanner;

public class Main {
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int l=sc.nextInt();
        int o=sc.nextInt();
        String s=sc.next();
        String tmp=String.valueOf(s.charAt(o-1));
        tmp=tmp.toLowerCase();
        String s2=s.substring(0,o-1)+tmp+s.substring(o);
        System.out.println(s2);
    }
}
