import java.util.*;

public class Main {
    //Changing a Character
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        String s = sc.next();
        System.out.println(sln(k, s));
    }

    public static String sln(int k, String s) {
        String res = s.substring(0, k - 1) + (s.charAt(k - 1) + "").toLowerCase() + s.substring(k);
        return res;
    }
} import java.util.*; util.* java public class Main {
    //Changing a Character
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        String s = sc.next();
        System.out.println(sln(k, s));
    }

    public static String sln(int k, String s) {
        String res = s.substring(0, k - 1) + (s.charAt(k - 1) + "").toLowerCase() + s.substring(k);
        return res;
    }
} Main //Changing a Character
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        String s = sc.next();
        System.out.println(sln(k, s));
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        String s = sc.next();
        System.out.println(sln(k, s));
    } 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 System.out.println(sln(k, s)) System.out.println System.out System System.out sln(k, s) sln k s String[] args args public static String sln(int k, String s) {
        String res = s.substring(0, k - 1) + (s.charAt(k - 1) + "").toLowerCase() + s.substring(k);
        return res;
    } sln {
        String res = s.substring(0, k - 1) + (s.charAt(k - 1) + "").toLowerCase() + s.substring(k);
        return res;
    } String res = s.substring(0, k - 1) + (s.charAt(k - 1) + "").toLowerCase() + s.substring(k); res s.substring(0, k - 1) + (s.charAt(k - 1) + "").toLowerCase() + s.substring(k) s.substring(0, k - 1) + (s.charAt(k - 1) + "").toLowerCase() + s.substring(k) s.substring(0, k - 1) s.substring s 0 k - 1 k 1 (s.charAt(k - 1) + "").toLowerCase() (s.charAt(k - 1) + "").toLowerCase (s.charAt(k - 1) + "") s.charAt(k - 1) s.charAt s k - 1 k 1 "" s.substring(k) s.substring s k return res; res int k k String s s public class Main {
    //Changing a Character
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        String s = sc.next();
        System.out.println(sln(k, s));
    }

    public static String sln(int k, String s) {
        String res = s.substring(0, k - 1) + (s.charAt(k - 1) + "").toLowerCase() + s.substring(k);
        return res;
    }
} public class Main {
    //Changing a Character
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        String s = sc.next();
        System.out.println(sln(k, s));
    }

    public static String sln(int k, String s) {
        String res = s.substring(0, k - 1) + (s.charAt(k - 1) + "").toLowerCase() + s.substring(k);
        return res;
    }
} Main
import java.util.*;

public class Main {
    //Changing a Character
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        String s = sc.next();
        System.out.println(sln(k, s));
    }

    public static String sln(int k, String s) {
        String res = s.substring(0, k - 1) + (s.charAt(k - 1) + "").toLowerCase() + s.substring(k);
        return res;
    }
}