import java.util.*;

public class Main{
    public static void main(String args[]){
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int K = scanner.nextInt();

        String S = scanner.next();
        char[] ch = S.toCharArray();
        Character chatk = ch[K-1];
        ch[K-1] = Character.toLowerCase(chatk);

        System.out.println(String.valueOf(ch));
    }
} import java.util.*; util.* java public class Main{
    public static void main(String args[]){
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int K = scanner.nextInt();

        String S = scanner.next();
        char[] ch = S.toCharArray();
        Character chatk = ch[K-1];
        ch[K-1] = Character.toLowerCase(chatk);

        System.out.println(String.valueOf(ch));
    }
} Main public static void main(String args[]){
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int K = scanner.nextInt();

        String S = scanner.next();
        char[] ch = S.toCharArray();
        Character chatk = ch[K-1];
        ch[K-1] = Character.toLowerCase(chatk);

        System.out.println(String.valueOf(ch));
    } main {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int K = scanner.nextInt();

        String S = scanner.next();
        char[] ch = S.toCharArray();
        Character chatk = ch[K-1];
        ch[K-1] = Character.toLowerCase(chatk);

        System.out.println(String.valueOf(ch));
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner int K = scanner.nextInt(); K scanner.nextInt() scanner.nextInt scanner String S = scanner.next(); S scanner.next() scanner.next scanner char[] ch = S.toCharArray(); ch S.toCharArray() S.toCharArray S Character chatk = ch[K-1]; chatk ch[K-1] ch K-1 K 1 ch[K-1] = Character.toLowerCase(chatk) ch[K-1] ch K-1 K 1 Character.toLowerCase(chatk) Character.toLowerCase Character chatk System.out.println(String.valueOf(ch)) System.out.println System.out System System.out String.valueOf(ch) String.valueOf String ch String args[] args public class Main{
    public static void main(String args[]){
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int K = scanner.nextInt();

        String S = scanner.next();
        char[] ch = S.toCharArray();
        Character chatk = ch[K-1];
        ch[K-1] = Character.toLowerCase(chatk);

        System.out.println(String.valueOf(ch));
    }
} public class Main{
    public static void main(String args[]){
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int K = scanner.nextInt();

        String S = scanner.next();
        char[] ch = S.toCharArray();
        Character chatk = ch[K-1];
        ch[K-1] = Character.toLowerCase(chatk);

        System.out.println(String.valueOf(ch));
    }
} Main
import java.util.*;

public class Main{
    public static void main(String args[]){
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int K = scanner.nextInt();

        String S = scanner.next();
        char[] ch = S.toCharArray();
        Character chatk = ch[K-1];
        ch[K-1] = Character.toLowerCase(chatk);

        System.out.println(String.valueOf(ch));
    }
}