import java.util.Scanner;
public class Main {
	public static void main(String args[]) {
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		int K = stdIn.nextInt();
		String S = stdIn.next();
		
		String[] s = S.split("",0);
		
		s[K-1] = s[K-1].toLowerCase();
		
		String a = String.join("", s);
		
		System.out.println(a);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String args[]) {
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		int K = stdIn.nextInt();
		String S = stdIn.next();
		
		String[] s = S.split("",0);
		
		s[K-1] = s[K-1].toLowerCase();
		
		String a = String.join("", s);
		
		System.out.println(a);
	}
} Main public static void main(String args[]) {
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		int K = stdIn.nextInt();
		String S = stdIn.next();
		
		String[] s = S.split("",0);
		
		s[K-1] = s[K-1].toLowerCase();
		
		String a = String.join("", s);
		
		System.out.println(a);
	} main {
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		int K = stdIn.nextInt();
		String S = stdIn.next();
		
		String[] s = S.split("",0);
		
		s[K-1] = s[K-1].toLowerCase();
		
		String a = String.join("", s);
		
		System.out.println(a);
	} Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) int N = stdIn.nextInt(); N stdIn.nextInt() stdIn.nextInt stdIn int K = stdIn.nextInt(); K stdIn.nextInt() stdIn.nextInt stdIn String S = stdIn.next(); S stdIn.next() stdIn.next stdIn String[] s = S.split("",0); s S.split("",0) S.split S "" 0 s[K-1] = s[K-1].toLowerCase() s[K-1] s K-1 K 1 s[K-1].toLowerCase() s[K-1].toLowerCase s[K-1] s K-1 K 1 String a = String.join("", s); a String.join("", s) String.join String "" s System.out.println(a) System.out.println System.out System System.out a String args[] args public class Main {
	public static void main(String args[]) {
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		int K = stdIn.nextInt();
		String S = stdIn.next();
		
		String[] s = S.split("",0);
		
		s[K-1] = s[K-1].toLowerCase();
		
		String a = String.join("", s);
		
		System.out.println(a);
	}
} public class Main {
	public static void main(String args[]) {
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		int K = stdIn.nextInt();
		String S = stdIn.next();
		
		String[] s = S.split("",0);
		
		s[K-1] = s[K-1].toLowerCase();
		
		String a = String.join("", s);
		
		System.out.println(a);
	}
} Main
import java.util.Scanner;
public class Main {
	public static void main(String args[]) {
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		int K = stdIn.nextInt();
		String S = stdIn.next();
		
		String[] s = S.split("",0);
		
		s[K-1] = s[K-1].toLowerCase();
		
		String a = String.join("", s);
		
		System.out.println(a);
	}
}