import java.util.*;

class Main
{
	public static void main(String[] args)
	{
		String S,str1,str2,Ans;
		int N,K;
		Scanner sc = new Scanner(System.in);
		N = sc.nextInt();
		K = sc.nextInt();
		S = sc.next();
		
		char c;
		c = S.charAt(K-1);
		c+=32;
		
		str1 = S.substring(0,K-1);
		str2 = S.substring(K);
		
		Ans = str1 + String.valueOf(c) + str2;
		System.out.println(Ans);
	}
} import java.util.*; util.* java class Main
{
	public static void main(String[] args)
	{
		String S,str1,str2,Ans;
		int N,K;
		Scanner sc = new Scanner(System.in);
		N = sc.nextInt();
		K = sc.nextInt();
		S = sc.next();
		
		char c;
		c = S.charAt(K-1);
		c+=32;
		
		str1 = S.substring(0,K-1);
		str2 = S.substring(K);
		
		Ans = str1 + String.valueOf(c) + str2;
		System.out.println(Ans);
	}
} Main public static void main(String[] args)
	{
		String S,str1,str2,Ans;
		int N,K;
		Scanner sc = new Scanner(System.in);
		N = sc.nextInt();
		K = sc.nextInt();
		S = sc.next();
		
		char c;
		c = S.charAt(K-1);
		c+=32;
		
		str1 = S.substring(0,K-1);
		str2 = S.substring(K);
		
		Ans = str1 + String.valueOf(c) + str2;
		System.out.println(Ans);
	} main {
		String S,str1,str2,Ans;
		int N,K;
		Scanner sc = new Scanner(System.in);
		N = sc.nextInt();
		K = sc.nextInt();
		S = sc.next();
		
		char c;
		c = S.charAt(K-1);
		c+=32;
		
		str1 = S.substring(0,K-1);
		str2 = S.substring(K);
		
		Ans = str1 + String.valueOf(c) + str2;
		System.out.println(Ans);
	} String S S str1 str1 str2 str2 Ans; Ans int N N K; K Scanner sc = new Scanner(System.in); sc new Scanner(System.in) N = sc.nextInt() N sc.nextInt() sc.nextInt sc K = sc.nextInt() K sc.nextInt() sc.nextInt sc S = sc.next() S sc.next() sc.next sc char c; c c = S.charAt(K-1) c S.charAt(K-1) S.charAt S K-1 K 1 c+=32 c 32 str1 = S.substring(0,K-1) str1 S.substring(0,K-1) S.substring S 0 K-1 K 1 str2 = S.substring(K) str2 S.substring(K) S.substring S K Ans = str1 + String.valueOf(c) + str2 Ans str1 + String.valueOf(c) + str2 str1 + String.valueOf(c) + str2 str1 String.valueOf(c) String.valueOf String c str2 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)
	{
		String S,str1,str2,Ans;
		int N,K;
		Scanner sc = new Scanner(System.in);
		N = sc.nextInt();
		K = sc.nextInt();
		S = sc.next();
		
		char c;
		c = S.charAt(K-1);
		c+=32;
		
		str1 = S.substring(0,K-1);
		str2 = S.substring(K);
		
		Ans = str1 + String.valueOf(c) + str2;
		System.out.println(Ans);
	}
}