import java.util.*;

public class Main{
	public  static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	int n = scan.nextInt();
      	int k = scan.nextInt();
      	String s = scan.next();
      	System.out.print(s.substring(0, k-1));
      	if(s.substring(k-1, k).contains("A")){
        	System.out.print("a");
        }
      	else if(s.substring(k-1, k).contains("B")){
        	System.out.print("b");
        }
        else if(s.substring(k-1, k).contains("C")){
        	System.out.print("c");
        }
      	System.out.print(s.substring(k, n));
    }
} import java.util.*; util.* java public class Main{
	public  static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	int n = scan.nextInt();
      	int k = scan.nextInt();
      	String s = scan.next();
      	System.out.print(s.substring(0, k-1));
      	if(s.substring(k-1, k).contains("A")){
        	System.out.print("a");
        }
      	else if(s.substring(k-1, k).contains("B")){
        	System.out.print("b");
        }
        else if(s.substring(k-1, k).contains("C")){
        	System.out.print("c");
        }
      	System.out.print(s.substring(k, n));
    }
} Main public  static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	int n = scan.nextInt();
      	int k = scan.nextInt();
      	String s = scan.next();
      	System.out.print(s.substring(0, k-1));
      	if(s.substring(k-1, k).contains("A")){
        	System.out.print("a");
        }
      	else if(s.substring(k-1, k).contains("B")){
        	System.out.print("b");
        }
        else if(s.substring(k-1, k).contains("C")){
        	System.out.print("c");
        }
      	System.out.print(s.substring(k, n));
    } main {
    	Scanner scan = new Scanner(System.in);
      	int n = scan.nextInt();
      	int k = scan.nextInt();
      	String s = scan.next();
      	System.out.print(s.substring(0, k-1));
      	if(s.substring(k-1, k).contains("A")){
        	System.out.print("a");
        }
      	else if(s.substring(k-1, k).contains("B")){
        	System.out.print("b");
        }
        else if(s.substring(k-1, k).contains("C")){
        	System.out.print("c");
        }
      	System.out.print(s.substring(k, n));
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int k = scan.nextInt(); k scan.nextInt() scan.nextInt scan String s = scan.next(); s scan.next() scan.next scan System.out.print(s.substring(0, k-1)) System.out.print System.out System System.out s.substring(0, k-1) s.substring s 0 k-1 k 1 if(s.substring(k-1, k).contains("A")){
        	System.out.print("a");
        }
      	else if(s.substring(k-1, k).contains("B")){
        	System.out.print("b");
        }
        else if(s.substring(k-1, k).contains("C")){
        	System.out.print("c");
        } s.substring(k-1, k).contains("A") s.substring(k-1, k).contains s.substring(k-1, k) s.substring s k-1 k 1 k "A" {
        	System.out.print("a");
        } System.out.print("a") System.out.print System.out System System.out "a" if(s.substring(k-1, k).contains("B")){
        	System.out.print("b");
        }
        else if(s.substring(k-1, k).contains("C")){
        	System.out.print("c");
        } s.substring(k-1, k).contains("B") s.substring(k-1, k).contains s.substring(k-1, k) s.substring s k-1 k 1 k "B" {
        	System.out.print("b");
        } System.out.print("b") System.out.print System.out System System.out "b" if(s.substring(k-1, k).contains("C")){
        	System.out.print("c");
        } s.substring(k-1, k).contains("C") s.substring(k-1, k).contains s.substring(k-1, k) s.substring s k-1 k 1 k "C" {
        	System.out.print("c");
        } System.out.print("c") System.out.print System.out System System.out "c" System.out.print(s.substring(k, n)) System.out.print System.out System System.out s.substring(k, n) s.substring s k n String[] args args public class Main{
	public  static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	int n = scan.nextInt();
      	int k = scan.nextInt();
      	String s = scan.next();
      	System.out.print(s.substring(0, k-1));
      	if(s.substring(k-1, k).contains("A")){
        	System.out.print("a");
        }
      	else if(s.substring(k-1, k).contains("B")){
        	System.out.print("b");
        }
        else if(s.substring(k-1, k).contains("C")){
        	System.out.print("c");
        }
      	System.out.print(s.substring(k, n));
    }
} public class Main{
	public  static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	int n = scan.nextInt();
      	int k = scan.nextInt();
      	String s = scan.next();
      	System.out.print(s.substring(0, k-1));
      	if(s.substring(k-1, k).contains("A")){
        	System.out.print("a");
        }
      	else if(s.substring(k-1, k).contains("B")){
        	System.out.print("b");
        }
        else if(s.substring(k-1, k).contains("C")){
        	System.out.print("c");
        }
      	System.out.print(s.substring(k, n));
    }
} Main
import java.util.*;

public class Main{
	public  static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	int n = scan.nextInt();
      	int k = scan.nextInt();
      	String s = scan.next();
      	System.out.print(s.substring(0, k-1));
      	if(s.substring(k-1, k).contains("A")){
        	System.out.print("a");
        }
      	else if(s.substring(k-1, k).contains("B")){
        	System.out.print("b");
        }
        else if(s.substring(k-1, k).contains("C")){
        	System.out.print("c");
        }
      	System.out.print(s.substring(k, n));
    }
}