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