
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scn=new Scanner(System.in);
		int n=scn.nextInt();
		int k=scn.nextInt();
		String str=scn.next();
		System.out.println(str.substring(0, k-1)+""+(char)(str.charAt(k-1)+32)+""+str.substring(k));
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scn=new Scanner(System.in);
		int n=scn.nextInt();
		int k=scn.nextInt();
		String str=scn.next();
		System.out.println(str.substring(0, k-1)+""+(char)(str.charAt(k-1)+32)+""+str.substring(k));
	}

} Main public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scn=new Scanner(System.in);
		int n=scn.nextInt();
		int k=scn.nextInt();
		String str=scn.next();
		System.out.println(str.substring(0, k-1)+""+(char)(str.charAt(k-1)+32)+""+str.substring(k));
	} main {
		// TODO Auto-generated method stub
		Scanner scn=new Scanner(System.in);
		int n=scn.nextInt();
		int k=scn.nextInt();
		String str=scn.next();
		System.out.println(str.substring(0, k-1)+""+(char)(str.charAt(k-1)+32)+""+str.substring(k));
	} Scanner scn=new Scanner(System.in); scn new Scanner(System.in) int n=scn.nextInt(); n scn.nextInt() scn.nextInt scn int k=scn.nextInt(); k scn.nextInt() scn.nextInt scn String str=scn.next(); str scn.next() scn.next scn System.out.println(str.substring(0, k-1)+""+(char)(str.charAt(k-1)+32)+""+str.substring(k)) System.out.println System.out System System.out str.substring(0, k-1)+""+(char)(str.charAt(k-1)+32)+""+str.substring(k) "" (char)(str.charAt(k-1)+32) str.substring(0, k-1)+""+(char)(str.charAt(k-1)+32)+""+str.substring(k) str.substring(0, k-1) str.substring str 0 k-1 k 1 "" (char)(str.charAt(k-1)+32) str.charAt(k-1) str.charAt str k-1 k 1 32 "" str.substring(k) str.substring str k String[] args args public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scn=new Scanner(System.in);
		int n=scn.nextInt();
		int k=scn.nextInt();
		String str=scn.next();
		System.out.println(str.substring(0, k-1)+""+(char)(str.charAt(k-1)+32)+""+str.substring(k));
	}

} public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scn=new Scanner(System.in);
		int n=scn.nextInt();
		int k=scn.nextInt();
		String str=scn.next();
		System.out.println(str.substring(0, k-1)+""+(char)(str.charAt(k-1)+32)+""+str.substring(k));
	}

} Main

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scn=new Scanner(System.in);
		int n=scn.nextInt();
		int k=scn.nextInt();
		String str=scn.next();
		System.out.println(str.substring(0, k-1)+""+(char)(str.charAt(k-1)+32)+""+str.substring(k));
	}

}
