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

