import java.util.*;
import static java.lang.Math.*;
import java.math.BigInteger;

public 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 result = "";
		
		char[] c = s.toCharArray();
		//c[k-1] += 32;
		c[k-1] = Character.toLowerCase(c[k-1]);
		result = new String(c);
		
		// 出力
		System.out.println(result);
	}
} import java.util.*; util.* java import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.Math.*; import java.math.BigInteger; BigInteger java.math public 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 result = "";
		
		char[] c = s.toCharArray();
		//c[k-1] += 32;
		c[k-1] = Character.toLowerCase(c[k-1]);
		result = new String(c);
		
		// 出力
		System.out.println(result);
	}
} 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 result = "";
		
		char[] c = s.toCharArray();
		//c[k-1] += 32;
		c[k-1] = Character.toLowerCase(c[k-1]);
		result = new String(c);
		
		// 出力
		System.out.println(result);
	} main {
		Scanner sc = new Scanner(System.in);
		
		// 入力
		int n = sc.nextInt();
		int k = sc.nextInt();
		String s = sc.next();
		
		// 計算
		String result = "";
		
		char[] c = s.toCharArray();
		//c[k-1] += 32;
		c[k-1] = Character.toLowerCase(c[k-1]);
		result = new String(c);
		
		// 出力
		System.out.println(result);
	} 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 result = ""; result "" char[] c = s.toCharArray(); c s.toCharArray() s.toCharArray s c[k-1] = Character.toLowerCase(c[k-1]) c[k-1] c k-1 k 1 Character.toLowerCase(c[k-1]) Character.toLowerCase Character c[k-1] c k-1 k 1 result = new String(c) result new String(c) System.out.println(result) System.out.println System.out System System.out result String[] args args public 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 result = "";
		
		char[] c = s.toCharArray();
		//c[k-1] += 32;
		c[k-1] = Character.toLowerCase(c[k-1]);
		result = new String(c);
		
		// 出力
		System.out.println(result);
	}
} public 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 result = "";
		
		char[] c = s.toCharArray();
		//c[k-1] += 32;
		c[k-1] = Character.toLowerCase(c[k-1]);
		result = new String(c);
		
		// 出力
		System.out.println(result);
	}
} Main
import java.util.*;
import static java.lang.Math.*;
import java.math.BigInteger;

public 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 result = "";
		
		char[] c = s.toCharArray();
		//c[k-1] += 32;
		c[k-1] = Character.toLowerCase(c[k-1]);
		result = new String(c);
		
		// 出力
		System.out.println(result);
	}
}