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 str = sc.next();
        String s[] = new String[n];

        for (int i = 0; i < n; i++) {
            s[i] = str.substring(i, i+1);
        }
        s[k-1] = s[k-1].toLowerCase();

        for (int i = 0; i < n; i++) {
            System.out.print(s[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 str = sc.next();
        String s[] = new String[n];

        for (int i = 0; i < n; i++) {
            s[i] = str.substring(i, i+1);
        }
        s[k-1] = s[k-1].toLowerCase();

        for (int i = 0; i < n; i++) {
            System.out.print(s[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 str = sc.next();
        String s[] = new String[n];

        for (int i = 0; i < n; i++) {
            s[i] = str.substring(i, i+1);
        }
        s[k-1] = s[k-1].toLowerCase();

        for (int i = 0; i < n; i++) {
            System.out.print(s[i]);
        }
        System.out.println();
	} main {
		Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int k = sc.nextInt();
        String str = sc.next();
        String s[] = new String[n];

        for (int i = 0; i < n; i++) {
            s[i] = str.substring(i, i+1);
        }
        s[k-1] = s[k-1].toLowerCase();

        for (int i = 0; i < n; i++) {
            System.out.print(s[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 str = sc.next(); str sc.next() sc.next sc String s[] = new String[n]; s new String[n] n for (int i = 0; i < n; i++) {
            s[i] = str.substring(i, i+1);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            s[i] = str.substring(i, i+1);
        } {
            s[i] = str.substring(i, i+1);
        } s[i] = str.substring(i, i+1) s[i] s i str.substring(i, i+1) str.substring str i i+1 i 1 s[k-1] = s[k-1].toLowerCase() s[k-1] s k-1 k 1 s[k-1].toLowerCase() s[k-1].toLowerCase s[k-1] s k-1 k 1 for (int i = 0; i < n; i++) {
            System.out.print(s[i]);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            System.out.print(s[i]);
        } {
            System.out.print(s[i]);
        } System.out.print(s[i]) System.out.print System.out System System.out s[i] s 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 str = sc.next();
        String s[] = new String[n];

        for (int i = 0; i < n; i++) {
            s[i] = str.substring(i, i+1);
        }
        s[k-1] = s[k-1].toLowerCase();

        for (int i = 0; i < n; i++) {
            System.out.print(s[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 str = sc.next();
        String s[] = new String[n];

        for (int i = 0; i < n; i++) {
            s[i] = str.substring(i, i+1);
        }
        s[k-1] = s[k-1].toLowerCase();

        for (int i = 0; i < n; i++) {
            System.out.print(s[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 str = sc.next();
        String s[] = new String[n];

        for (int i = 0; i < n; i++) {
            s[i] = str.substring(i, i+1);
        }
        s[k-1] = s[k-1].toLowerCase();

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