
import java.util.Scanner;

public class Main {
	
	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		
		
		while(scan.hasNext())
		{
			int n,k;
			n=scan.nextInt();
			k=scan.nextInt();
			String s,s1 ;
			s=scan.next();
			char arr[]=s.toCharArray();
			char c=Character.toLowerCase(arr[k-1]);
			arr[k-1]=c;
			System.out.println(arr);
			
			
			
		}
	}

} import java.util.Scanner; Scanner java.util public class Main {
	
	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		
		
		while(scan.hasNext())
		{
			int n,k;
			n=scan.nextInt();
			k=scan.nextInt();
			String s,s1 ;
			s=scan.next();
			char arr[]=s.toCharArray();
			char c=Character.toLowerCase(arr[k-1]);
			arr[k-1]=c;
			System.out.println(arr);
			
			
			
		}
	}

} Main public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		
		
		while(scan.hasNext())
		{
			int n,k;
			n=scan.nextInt();
			k=scan.nextInt();
			String s,s1 ;
			s=scan.next();
			char arr[]=s.toCharArray();
			char c=Character.toLowerCase(arr[k-1]);
			arr[k-1]=c;
			System.out.println(arr);
			
			
			
		}
	} main {
		Scanner scan=new Scanner(System.in);
		
		
		while(scan.hasNext())
		{
			int n,k;
			n=scan.nextInt();
			k=scan.nextInt();
			String s,s1 ;
			s=scan.next();
			char arr[]=s.toCharArray();
			char c=Character.toLowerCase(arr[k-1]);
			arr[k-1]=c;
			System.out.println(arr);
			
			
			
		}
	} Scanner scan=new Scanner(System.in); scan new Scanner(System.in) while(scan.hasNext())
		{
			int n,k;
			n=scan.nextInt();
			k=scan.nextInt();
			String s,s1 ;
			s=scan.next();
			char arr[]=s.toCharArray();
			char c=Character.toLowerCase(arr[k-1]);
			arr[k-1]=c;
			System.out.println(arr);
			
			
			
		} scan.hasNext() scan.hasNext scan {
			int n,k;
			n=scan.nextInt();
			k=scan.nextInt();
			String s,s1 ;
			s=scan.next();
			char arr[]=s.toCharArray();
			char c=Character.toLowerCase(arr[k-1]);
			arr[k-1]=c;
			System.out.println(arr);
			
			
			
		} int n n k; k n=scan.nextInt() n scan.nextInt() scan.nextInt scan k=scan.nextInt() k scan.nextInt() scan.nextInt scan String s s s1 ; s1 s=scan.next() s scan.next() scan.next scan char arr[]=s.toCharArray(); arr s.toCharArray() s.toCharArray s char c=Character.toLowerCase(arr[k-1]); c Character.toLowerCase(arr[k-1]) Character.toLowerCase Character arr[k-1] arr k-1 k 1 arr[k-1]=c arr[k-1] arr k-1 k 1 c System.out.println(arr) System.out.println System.out System System.out arr String[] args args public class Main {
	
	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		
		
		while(scan.hasNext())
		{
			int n,k;
			n=scan.nextInt();
			k=scan.nextInt();
			String s,s1 ;
			s=scan.next();
			char arr[]=s.toCharArray();
			char c=Character.toLowerCase(arr[k-1]);
			arr[k-1]=c;
			System.out.println(arr);
			
			
			
		}
	}

} public class Main {
	
	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		
		
		while(scan.hasNext())
		{
			int n,k;
			n=scan.nextInt();
			k=scan.nextInt();
			String s,s1 ;
			s=scan.next();
			char arr[]=s.toCharArray();
			char c=Character.toLowerCase(arr[k-1]);
			arr[k-1]=c;
			System.out.println(arr);
			
			
			
		}
	}

} Main

import java.util.Scanner;

public class Main {
	
	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		
		
		while(scan.hasNext())
		{
			int n,k;
			n=scan.nextInt();
			k=scan.nextInt();
			String s,s1 ;
			s=scan.next();
			char arr[]=s.toCharArray();
			char c=Character.toLowerCase(arr[k-1]);
			arr[k-1]=c;
			System.out.println(arr);
			
			
			
		}
	}

}
