import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = Integer.parseInt(scanner.next());
        int K = Integer.parseInt(scanner.next());
        char[] S = scanner.next().toCharArray();
        scanner.close();

        S[K - 1] = String.valueOf(S[K-1]).toLowerCase().charAt(0);

        System.out.println(String.valueOf(S));
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = Integer.parseInt(scanner.next());
        int K = Integer.parseInt(scanner.next());
        char[] S = scanner.next().toCharArray();
        scanner.close();

        S[K - 1] = String.valueOf(S[K-1]).toLowerCase().charAt(0);

        System.out.println(String.valueOf(S));
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = Integer.parseInt(scanner.next());
        int K = Integer.parseInt(scanner.next());
        char[] S = scanner.next().toCharArray();
        scanner.close();

        S[K - 1] = String.valueOf(S[K-1]).toLowerCase().charAt(0);

        System.out.println(String.valueOf(S));
    } main {
        Scanner scanner = new Scanner(System.in);
        int N = Integer.parseInt(scanner.next());
        int K = Integer.parseInt(scanner.next());
        char[] S = scanner.next().toCharArray();
        scanner.close();

        S[K - 1] = String.valueOf(S[K-1]).toLowerCase().charAt(0);

        System.out.println(String.valueOf(S));
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = Integer.parseInt(scanner.next()); N Integer.parseInt(scanner.next()) Integer.parseInt Integer scanner.next() scanner.next scanner int K = Integer.parseInt(scanner.next()); K Integer.parseInt(scanner.next()) Integer.parseInt Integer scanner.next() scanner.next scanner char[] S = scanner.next().toCharArray(); S scanner.next().toCharArray() scanner.next().toCharArray scanner.next() scanner.next scanner scanner.close() scanner.close scanner S[K - 1] = String.valueOf(S[K-1]).toLowerCase().charAt(0) S[K - 1] S K - 1 K 1 String.valueOf(S[K-1]).toLowerCase().charAt(0) String.valueOf(S[K-1]).toLowerCase().charAt String.valueOf(S[K-1]).toLowerCase() String.valueOf(S[K-1]).toLowerCase String.valueOf(S[K-1]) String.valueOf String S[K-1] S K-1 K 1 0 System.out.println(String.valueOf(S)) System.out.println System.out System System.out String.valueOf(S) String.valueOf String S String[] args args public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = Integer.parseInt(scanner.next());
        int K = Integer.parseInt(scanner.next());
        char[] S = scanner.next().toCharArray();
        scanner.close();

        S[K - 1] = String.valueOf(S[K-1]).toLowerCase().charAt(0);

        System.out.println(String.valueOf(S));
    }
} public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = Integer.parseInt(scanner.next());
        int K = Integer.parseInt(scanner.next());
        char[] S = scanner.next().toCharArray();
        scanner.close();

        S[K - 1] = String.valueOf(S[K-1]).toLowerCase().charAt(0);

        System.out.println(String.valueOf(S));
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = Integer.parseInt(scanner.next());
        int K = Integer.parseInt(scanner.next());
        char[] S = scanner.next().toCharArray();
        scanner.close();

        S[K - 1] = String.valueOf(S[K-1]).toLowerCase().charAt(0);

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