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();
        StringBuilder sb = new StringBuilder();
        sb.append(sc.next());
      
        char c = sb.charAt(k-1);
      
        c = Character.toLowerCase(c);
        sb.setCharAt(k-1,c);
        System.out.println(sb.toString());
    }
} 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();
        StringBuilder sb = new StringBuilder();
        sb.append(sc.next());
      
        char c = sb.charAt(k-1);
      
        c = Character.toLowerCase(c);
        sb.setCharAt(k-1,c);
        System.out.println(sb.toString());
    }
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        StringBuilder sb = new StringBuilder();
        sb.append(sc.next());
      
        char c = sb.charAt(k-1);
      
        c = Character.toLowerCase(c);
        sb.setCharAt(k-1,c);
        System.out.println(sb.toString());
    } main {
		Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        StringBuilder sb = new StringBuilder();
        sb.append(sc.next());
      
        char c = sb.charAt(k-1);
      
        c = Character.toLowerCase(c);
        sb.setCharAt(k-1,c);
        System.out.println(sb.toString());
    } 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 StringBuilder sb = new StringBuilder(); sb new StringBuilder() sb.append(sc.next()) sb.append sb sc.next() sc.next sc char c = sb.charAt(k-1); c sb.charAt(k-1) sb.charAt sb k-1 k 1 c = Character.toLowerCase(c) c Character.toLowerCase(c) Character.toLowerCase Character c sb.setCharAt(k-1,c) sb.setCharAt sb k-1 k 1 c System.out.println(sb.toString()) System.out.println System.out System System.out sb.toString() sb.toString sb 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();
        StringBuilder sb = new StringBuilder();
        sb.append(sc.next());
      
        char c = sb.charAt(k-1);
      
        c = Character.toLowerCase(c);
        sb.setCharAt(k-1,c);
        System.out.println(sb.toString());
    }
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        StringBuilder sb = new StringBuilder();
        sb.append(sc.next());
      
        char c = sb.charAt(k-1);
      
        c = Character.toLowerCase(c);
        sb.setCharAt(k-1,c);
        System.out.println(sb.toString());
    }
} 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();
        StringBuilder sb = new StringBuilder();
        sb.append(sc.next());
      
        char c = sb.charAt(k-1);
      
        c = Character.toLowerCase(c);
        sb.setCharAt(k-1,c);
        System.out.println(sb.toString());
    }
}
