import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int k = scan.nextInt();
        String s = scan.next();


        char[] cs = s.toCharArray();
        cs[k-1] = (char) (cs[k-1] - ('A' - 'a'));
        String ns = new String(cs);
        System.out.print(ns);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int k = scan.nextInt();
        String s = scan.next();


        char[] cs = s.toCharArray();
        cs[k-1] = (char) (cs[k-1] - ('A' - 'a'));
        String ns = new String(cs);
        System.out.print(ns);
    }
} Main public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int k = scan.nextInt();
        String s = scan.next();


        char[] cs = s.toCharArray();
        cs[k-1] = (char) (cs[k-1] - ('A' - 'a'));
        String ns = new String(cs);
        System.out.print(ns);
    } main {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int k = scan.nextInt();
        String s = scan.next();


        char[] cs = s.toCharArray();
        cs[k-1] = (char) (cs[k-1] - ('A' - 'a'));
        String ns = new String(cs);
        System.out.print(ns);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int k = scan.nextInt(); k scan.nextInt() scan.nextInt scan String s = scan.next(); s scan.next() scan.next scan char[] cs = s.toCharArray(); cs s.toCharArray() s.toCharArray s cs[k-1] = (char) (cs[k-1] - ('A' - 'a')) cs[k-1] cs k-1 k 1 (char) (cs[k-1] - ('A' - 'a')) cs[k-1] cs k-1 k 1 ('A' - 'a') 'A' 'a' String ns = new String(cs); ns new String(cs) System.out.print(ns) System.out.print System.out System System.out ns String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int k = scan.nextInt();
        String s = scan.next();


        char[] cs = s.toCharArray();
        cs[k-1] = (char) (cs[k-1] - ('A' - 'a'));
        String ns = new String(cs);
        System.out.print(ns);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int k = scan.nextInt();
        String s = scan.next();


        char[] cs = s.toCharArray();
        cs[k-1] = (char) (cs[k-1] - ('A' - 'a'));
        String ns = new String(cs);
        System.out.print(ns);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int k = scan.nextInt();
        String s = scan.next();


        char[] cs = s.toCharArray();
        cs[k-1] = (char) (cs[k-1] - ('A' - 'a'));
        String ns = new String(cs);
        System.out.print(ns);
    }
}