import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n,k;
    String s;
    n=sc.nextInt();
    k=sc.nextInt();
    sc.nextLine();
    s=sc.nextLine();
    char[] c = s.toCharArray();
    c[k-1] = Character.toLowerCase(c[k-1]);
	System.out.println(String.valueOf(c));
    
  }
} import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n,k;
    String s;
    n=sc.nextInt();
    k=sc.nextInt();
    sc.nextLine();
    s=sc.nextLine();
    char[] c = s.toCharArray();
    c[k-1] = Character.toLowerCase(c[k-1]);
	System.out.println(String.valueOf(c));
    
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n,k;
    String s;
    n=sc.nextInt();
    k=sc.nextInt();
    sc.nextLine();
    s=sc.nextLine();
    char[] c = s.toCharArray();
    c[k-1] = Character.toLowerCase(c[k-1]);
	System.out.println(String.valueOf(c));
    
  } main {
    Scanner sc = new Scanner(System.in);
    int n,k;
    String s;
    n=sc.nextInt();
    k=sc.nextInt();
    sc.nextLine();
    s=sc.nextLine();
    char[] c = s.toCharArray();
    c[k-1] = Character.toLowerCase(c[k-1]);
	System.out.println(String.valueOf(c));
    
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n n k; k String s; s n=sc.nextInt() n sc.nextInt() sc.nextInt sc k=sc.nextInt() k sc.nextInt() sc.nextInt sc sc.nextLine() sc.nextLine sc s=sc.nextLine() s sc.nextLine() sc.nextLine sc char[] c = s.toCharArray(); c s.toCharArray() s.toCharArray s c[k-1] = Character.toLowerCase(c[k-1]) c[k-1] c k-1 k 1 Character.toLowerCase(c[k-1]) Character.toLowerCase Character c[k-1] c k-1 k 1 System.out.println(String.valueOf(c)) System.out.println System.out System System.out String.valueOf(c) String.valueOf String c String[] args args public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n,k;
    String s;
    n=sc.nextInt();
    k=sc.nextInt();
    sc.nextLine();
    s=sc.nextLine();
    char[] c = s.toCharArray();
    c[k-1] = Character.toLowerCase(c[k-1]);
	System.out.println(String.valueOf(c));
    
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n,k;
    String s;
    n=sc.nextInt();
    k=sc.nextInt();
    sc.nextLine();
    s=sc.nextLine();
    char[] c = s.toCharArray();
    c[k-1] = Character.toLowerCase(c[k-1]);
	System.out.println(String.valueOf(c));
    
  }
} Main
import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n,k;
    String s;
    n=sc.nextInt();
    k=sc.nextInt();
    sc.nextLine();
    s=sc.nextLine();
    char[] c = s.toCharArray();
    c[k-1] = Character.toLowerCase(c[k-1]);
	System.out.println(String.valueOf(c));
    
  }
}
