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();
        sc.nextLine();
        StringBuilder sb = new StringBuilder(sc.nextLine());

        sb.setCharAt(k-1, Character.toLowerCase(sb.charAt(k-1)));
        System.out.println(sb);
    }
} 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();
        sc.nextLine();
        StringBuilder sb = new StringBuilder(sc.nextLine());

        sb.setCharAt(k-1, Character.toLowerCase(sb.charAt(k-1)));
        System.out.println(sb);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        sc.nextLine();
        StringBuilder sb = new StringBuilder(sc.nextLine());

        sb.setCharAt(k-1, Character.toLowerCase(sb.charAt(k-1)));
        System.out.println(sb);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        sc.nextLine();
        StringBuilder sb = new StringBuilder(sc.nextLine());

        sb.setCharAt(k-1, Character.toLowerCase(sb.charAt(k-1)));
        System.out.println(sb);
    } 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 sc.nextLine() sc.nextLine sc StringBuilder sb = new StringBuilder(sc.nextLine()); sb new StringBuilder(sc.nextLine()) sb.setCharAt(k-1, Character.toLowerCase(sb.charAt(k-1))) sb.setCharAt sb k-1 k 1 Character.toLowerCase(sb.charAt(k-1)) Character.toLowerCase Character sb.charAt(k-1) sb.charAt sb k-1 k 1 System.out.println(sb) System.out.println System.out System System.out sb 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();
        sc.nextLine();
        StringBuilder sb = new StringBuilder(sc.nextLine());

        sb.setCharAt(k-1, Character.toLowerCase(sb.charAt(k-1)));
        System.out.println(sb);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        sc.nextLine();
        StringBuilder sb = new StringBuilder(sc.nextLine());

        sb.setCharAt(k-1, Character.toLowerCase(sb.charAt(k-1)));
        System.out.println(sb);
    }
} 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();
        sc.nextLine();
        StringBuilder sb = new StringBuilder(sc.nextLine());

        sb.setCharAt(k-1, Character.toLowerCase(sb.charAt(k-1)));
        System.out.println(sb);
    }
}