import java.util.*;
class Main{
	public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	int n = scan.nextInt();
      	int k = scan.nextInt();
      	String word = scan.next();
            
      	String ans = word.substring(0,k-1) + word.substring(k-1,k).toLowerCase() + word.substring(k,n);
       System.out.println(ans);
    }
} import java.util.*; util.* java class Main{
	public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	int n = scan.nextInt();
      	int k = scan.nextInt();
      	String word = scan.next();
            
      	String ans = word.substring(0,k-1) + word.substring(k-1,k).toLowerCase() + word.substring(k,n);
       System.out.println(ans);
    }
} Main public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	int n = scan.nextInt();
      	int k = scan.nextInt();
      	String word = scan.next();
            
      	String ans = word.substring(0,k-1) + word.substring(k-1,k).toLowerCase() + word.substring(k,n);
       System.out.println(ans);
    } main {
    	Scanner scan = new Scanner(System.in);
      	int n = scan.nextInt();
      	int k = scan.nextInt();
      	String word = scan.next();
            
      	String ans = word.substring(0,k-1) + word.substring(k-1,k).toLowerCase() + word.substring(k,n);
       System.out.println(ans);
    } 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 word = scan.next(); word scan.next() scan.next scan String ans = word.substring(0,k-1) + word.substring(k-1,k).toLowerCase() + word.substring(k,n); ans word.substring(0,k-1) + word.substring(k-1,k).toLowerCase() + word.substring(k,n) word.substring(0,k-1) + word.substring(k-1,k).toLowerCase() + word.substring(k,n) word.substring(0,k-1) word.substring word 0 k-1 k 1 word.substring(k-1,k).toLowerCase() word.substring(k-1,k).toLowerCase word.substring(k-1,k) word.substring word k-1 k 1 k word.substring(k,n) word.substring word k n System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.*;
class Main{
	public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	int n = scan.nextInt();
      	int k = scan.nextInt();
      	String word = scan.next();
            
      	String ans = word.substring(0,k-1) + word.substring(k-1,k).toLowerCase() + word.substring(k,n);
       System.out.println(ans);
    }
}