import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int k = scan.nextInt();
		String s = scan.next();
		
		byte[] sbyte = s.getBytes();
		sbyte[k-1] += 32;
		
		String sa = new String(sbyte);
		
		System.out.println(sa);
		
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int k = scan.nextInt();
		String s = scan.next();
		
		byte[] sbyte = s.getBytes();
		sbyte[k-1] += 32;
		
		String sa = new String(sbyte);
		
		System.out.println(sa);
		
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int k = scan.nextInt();
		String s = scan.next();
		
		byte[] sbyte = s.getBytes();
		sbyte[k-1] += 32;
		
		String sa = new String(sbyte);
		
		System.out.println(sa);
		
	} main {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int k = scan.nextInt();
		String s = scan.next();
		
		byte[] sbyte = s.getBytes();
		sbyte[k-1] += 32;
		
		String sa = new String(sbyte);
		
		System.out.println(sa);
		
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int k = scan.nextInt(); k scan.nextInt() scan.nextInt scan String s = scan.next(); s scan.next() scan.next scan byte[] sbyte = s.getBytes(); sbyte s.getBytes() s.getBytes s sbyte[k-1] += 32 sbyte[k-1] sbyte k-1 k 1 32 String sa = new String(sbyte); sa new String(sbyte) System.out.println(sa) System.out.println System.out System System.out sa String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int k = scan.nextInt();
		String s = scan.next();
		
		byte[] sbyte = s.getBytes();
		sbyte[k-1] += 32;
		
		String sa = new String(sbyte);
		
		System.out.println(sa);
		
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int k = scan.nextInt();
		String s = scan.next();
		
		byte[] sbyte = s.getBytes();
		sbyte[k-1] += 32;
		
		String sa = new String(sbyte);
		
		System.out.println(sa);
		
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int k = scan.nextInt();
		String s = scan.next();
		
		byte[] sbyte = s.getBytes();
		sbyte[k-1] += 32;
		
		String sa = new String(sbyte);
		
		System.out.println(sa);
		
	}
}