import java.util.*; 

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();
     

  		String[] s1=s.split("");
		
    
 	if(s1[k-1].equals("A")){
    		s1[k-1]="a";
    	}else if(s1[k-1].equals("B")){
     		s1[k-1]="b";
   	 }else{
    	s1[k-1]="c";
    }
  		String ans="";
		for(String a:s1){
    		ans+=a;
        }
  		System.out.println(ans);
    }
} import java.util.*; util.* java 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();
     

  		String[] s1=s.split("");
		
    
 	if(s1[k-1].equals("A")){
    		s1[k-1]="a";
    	}else if(s1[k-1].equals("B")){
     		s1[k-1]="b";
   	 }else{
    	s1[k-1]="c";
    }
  		String ans="";
		for(String a:s1){
    		ans+=a;
        }
  		System.out.println(ans);
    }
} 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();
     

  		String[] s1=s.split("");
		
    
 	if(s1[k-1].equals("A")){
    		s1[k-1]="a";
    	}else if(s1[k-1].equals("B")){
     		s1[k-1]="b";
   	 }else{
    	s1[k-1]="c";
    }
  		String ans="";
		for(String a:s1){
    		ans+=a;
        }
  		System.out.println(ans);
    } main {
	Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int k=sc.nextInt();
		
		String s=sc.next();
     

  		String[] s1=s.split("");
		
    
 	if(s1[k-1].equals("A")){
    		s1[k-1]="a";
    	}else if(s1[k-1].equals("B")){
     		s1[k-1]="b";
   	 }else{
    	s1[k-1]="c";
    }
  		String ans="";
		for(String a:s1){
    		ans+=a;
        }
  		System.out.println(ans);
    } 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 String[] s1=s.split(""); s1 s.split("") s.split s "" if(s1[k-1].equals("A")){
    		s1[k-1]="a";
    	}else if(s1[k-1].equals("B")){
     		s1[k-1]="b";
   	 }else{
    	s1[k-1]="c";
    } s1[k-1].equals("A") s1[k-1].equals s1[k-1] s1 k-1 k 1 "A" {
    		s1[k-1]="a";
    	} s1[k-1]="a" s1[k-1] s1 k-1 k 1 "a" if(s1[k-1].equals("B")){
     		s1[k-1]="b";
   	 }else{
    	s1[k-1]="c";
    } s1[k-1].equals("B") s1[k-1].equals s1[k-1] s1 k-1 k 1 "B" {
     		s1[k-1]="b";
   	 } s1[k-1]="b" s1[k-1] s1 k-1 k 1 "b" {
    	s1[k-1]="c";
    } s1[k-1]="c" s1[k-1] s1 k-1 k 1 "c" String ans=""; ans "" for(String a:s1){
    		ans+=a;
        } String a s1 {
    		ans+=a;
        } {
    		ans+=a;
        } ans+=a ans a System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.*; 

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();
     

  		String[] s1=s.split("");
		
    
 	if(s1[k-1].equals("A")){
    		s1[k-1]="a";
    	}else if(s1[k-1].equals("B")){
     		s1[k-1]="b";
   	 }else{
    	s1[k-1]="c";
    }
  		String ans="";
		for(String a:s1){
    		ans+=a;
        }
  		System.out.println(ans);
    }
}