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();
        int b = (int) s.charAt(k-1);
        b+=32;
		System.out.println(s.substring(0,k-1)+(char)b+s.substring(k,n));
  }
} 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();
        int b = (int) s.charAt(k-1);
        b+=32;
		System.out.println(s.substring(0,k-1)+(char)b+s.substring(k,n));
  }
} 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();
        int b = (int) s.charAt(k-1);
        b+=32;
		System.out.println(s.substring(0,k-1)+(char)b+s.substring(k,n));
  } main {
		Scanner sc = new Scanner(System.in);       
		int n = sc.nextInt();
        int k = sc.nextInt();
        String s = sc.next();
        int b = (int) s.charAt(k-1);
        b+=32;
		System.out.println(s.substring(0,k-1)+(char)b+s.substring(k,n));
  } 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 int b = (int) s.charAt(k-1); b (int) s.charAt(k-1) s.charAt s k-1 k 1 b+=32 b 32 System.out.println(s.substring(0,k-1)+(char)b+s.substring(k,n)) System.out.println System.out System System.out s.substring(0,k-1)+(char)b+s.substring(k,n) s.substring(0,k-1)+(char)b+s.substring(k,n) s.substring(0,k-1) s.substring s 0 k-1 k 1 (char)b s.substring(k,n) s.substring s k n 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();
        int b = (int) s.charAt(k-1);
        b+=32;
		System.out.println(s.substring(0,k-1)+(char)b+s.substring(k,n));
  }
} 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();
        int b = (int) s.charAt(k-1);
        b+=32;
		System.out.println(s.substring(0,k-1)+(char)b+s.substring(k,n));
  }
} 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();
        int b = (int) s.charAt(k-1);
        b+=32;
		System.out.println(s.substring(0,k-1)+(char)b+s.substring(k,n));
  }
}