
import java.util.Scanner;

public class Main {

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

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

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

} Main public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		
		char[] str = sc.next().toCharArray();
		
		str[k - 1] += 32;
		
		System.out.println(str);
	} main {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		
		char[] str = sc.next().toCharArray();
		
		str[k - 1] += 32;
		
		System.out.println(str);
	} 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 char[] str = sc.next().toCharArray(); str sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc str[k - 1] += 32 str[k - 1] str k - 1 k 1 32 System.out.println(str) System.out.println System.out System System.out str String[] args args public class Main {

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

} public class Main {

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

} Main

import java.util.Scanner;

public class Main {

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

}
