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();
    char[]c = S.toCharArray();

    if(c[K-1]=='A'){
        c[K-1]='a';
    }else if(c[K-1]=='B'){
        c[K-1]='b';
    }else{
        c[K-1]='c';
    }
    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 = sc.nextInt();
    int K = sc.nextInt();
    String S = sc.next();
    char[]c = S.toCharArray();

    if(c[K-1]=='A'){
        c[K-1]='a';
    }else if(c[K-1]=='B'){
        c[K-1]='b';
    }else{
        c[K-1]='c';
    }
    System.out.println(String.valueOf(c));    
      }
} 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();
    char[]c = S.toCharArray();

    if(c[K-1]=='A'){
        c[K-1]='a';
    }else if(c[K-1]=='B'){
        c[K-1]='b';
    }else{
        c[K-1]='c';
    }
    System.out.println(String.valueOf(c));    
      } main {
    
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int K = sc.nextInt();
    String S = sc.next();
    char[]c = S.toCharArray();

    if(c[K-1]=='A'){
        c[K-1]='a';
    }else if(c[K-1]=='B'){
        c[K-1]='b';
    }else{
        c[K-1]='c';
    }
    System.out.println(String.valueOf(c));    
      } 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 char[]c = S.toCharArray(); c S.toCharArray() S.toCharArray S if(c[K-1]=='A'){
        c[K-1]='a';
    }else if(c[K-1]=='B'){
        c[K-1]='b';
    }else{
        c[K-1]='c';
    } c[K-1]=='A' c[K-1] c K-1 K 1 'A' {
        c[K-1]='a';
    } c[K-1]='a' c[K-1] c K-1 K 1 'a' if(c[K-1]=='B'){
        c[K-1]='b';
    }else{
        c[K-1]='c';
    } c[K-1]=='B' c[K-1] c K-1 K 1 'B' {
        c[K-1]='b';
    } c[K-1]='b' c[K-1] c K-1 K 1 'b' {
        c[K-1]='c';
    } c[K-1]='c' c[K-1] c K-1 K 1 'c' 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 = sc.nextInt();
    int K = sc.nextInt();
    String S = sc.next();
    char[]c = S.toCharArray();

    if(c[K-1]=='A'){
        c[K-1]='a';
    }else if(c[K-1]=='B'){
        c[K-1]='b';
    }else{
        c[K-1]='c';
    }
    System.out.println(String.valueOf(c));    
      }
} 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();
    char[]c = S.toCharArray();

    if(c[K-1]=='A'){
        c[K-1]='a';
    }else if(c[K-1]=='B'){
        c[K-1]='b';
    }else{
        c[K-1]='c';
    }
    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 = sc.nextInt();
    int K = sc.nextInt();
    String S = sc.next();
    char[]c = S.toCharArray();

    if(c[K-1]=='A'){
        c[K-1]='a';
    }else if(c[K-1]=='B'){
        c[K-1]='b';
    }else{
        c[K-1]='c';
    }
    System.out.println(String.valueOf(c));    
      }
}