import java.util.*;

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

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