import java.util.*;
import java.io.*;
import java.lang.*;

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 m = s.charAt(k-1);

        System.out.println(s.substring(0,k-1)+Character.toLowerCase(m)+s.substring(k));
    }
} import java.util.*; util.* java import java.io.*; io.* java import java.lang.*; lang.* 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 m = s.charAt(k-1);

        System.out.println(s.substring(0,k-1)+Character.toLowerCase(m)+s.substring(k));
    }
} 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 m = s.charAt(k-1);

        System.out.println(s.substring(0,k-1)+Character.toLowerCase(m)+s.substring(k));
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        String s = sc.next();
        char m = s.charAt(k-1);

        System.out.println(s.substring(0,k-1)+Character.toLowerCase(m)+s.substring(k));
    } 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 m = s.charAt(k-1); m s.charAt(k-1) s.charAt s k-1 k 1 System.out.println(s.substring(0,k-1)+Character.toLowerCase(m)+s.substring(k)) System.out.println System.out System System.out s.substring(0,k-1)+Character.toLowerCase(m)+s.substring(k) s.substring(0,k-1)+Character.toLowerCase(m)+s.substring(k) s.substring(0,k-1) s.substring s 0 k-1 k 1 Character.toLowerCase(m) Character.toLowerCase Character m s.substring(k) s.substring s k 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 m = s.charAt(k-1);

        System.out.println(s.substring(0,k-1)+Character.toLowerCase(m)+s.substring(k));
    }
} 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 m = s.charAt(k-1);

        System.out.println(s.substring(0,k-1)+Character.toLowerCase(m)+s.substring(k));
    }
} Main
import java.util.*;
import java.io.*;
import java.lang.*;

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 m = s.charAt(k-1);

        System.out.println(s.substring(0,k-1)+Character.toLowerCase(m)+s.substring(k));
    }
}
