import java.util.*;
import java.lang.*;
import java.io.*;

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();
	
	for(int i = 0; i < n; i++){
		if(i != k-1){
			System.out.printf(s.substring(i,i+1));
		}else{
			System.out.printf(s.substring(i,i+1).toLowerCase());
		}
	}
}
} import java.util.*; util.* java import java.lang.*; lang.* java import java.io.*; io.* java 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();
	
	for(int i = 0; i < n; i++){
		if(i != k-1){
			System.out.printf(s.substring(i,i+1));
		}else{
			System.out.printf(s.substring(i,i+1).toLowerCase());
		}
	}
}
} 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();
	
	for(int i = 0; i < n; i++){
		if(i != k-1){
			System.out.printf(s.substring(i,i+1));
		}else{
			System.out.printf(s.substring(i,i+1).toLowerCase());
		}
	}
} main {
	Scanner sc = new Scanner(System.in);
	int n = sc.nextInt();
	int k = sc.nextInt();
	String s = sc.next();
	
	for(int i = 0; i < n; i++){
		if(i != k-1){
			System.out.printf(s.substring(i,i+1));
		}else{
			System.out.printf(s.substring(i,i+1).toLowerCase());
		}
	}
} 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 for(int i = 0; i < n; i++){
		if(i != k-1){
			System.out.printf(s.substring(i,i+1));
		}else{
			System.out.printf(s.substring(i,i+1).toLowerCase());
		}
	} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
		if(i != k-1){
			System.out.printf(s.substring(i,i+1));
		}else{
			System.out.printf(s.substring(i,i+1).toLowerCase());
		}
	} {
		if(i != k-1){
			System.out.printf(s.substring(i,i+1));
		}else{
			System.out.printf(s.substring(i,i+1).toLowerCase());
		}
	} if(i != k-1){
			System.out.printf(s.substring(i,i+1));
		}else{
			System.out.printf(s.substring(i,i+1).toLowerCase());
		} i != k-1 i k-1 k 1 {
			System.out.printf(s.substring(i,i+1));
		} System.out.printf(s.substring(i,i+1)) System.out.printf System.out System System.out s.substring(i,i+1) s.substring s i i+1 i 1 {
			System.out.printf(s.substring(i,i+1).toLowerCase());
		} System.out.printf(s.substring(i,i+1).toLowerCase()) System.out.printf System.out System System.out s.substring(i,i+1).toLowerCase() s.substring(i,i+1).toLowerCase s.substring(i,i+1) s.substring s i i+1 i 1 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();
	
	for(int i = 0; i < n; i++){
		if(i != k-1){
			System.out.printf(s.substring(i,i+1));
		}else{
			System.out.printf(s.substring(i,i+1).toLowerCase());
		}
	}
}
} 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();
	
	for(int i = 0; i < n; i++){
		if(i != k-1){
			System.out.printf(s.substring(i,i+1));
		}else{
			System.out.printf(s.substring(i,i+1).toLowerCase());
		}
	}
}
} Main
import java.util.*;
import java.lang.*;
import java.io.*;

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();
	
	for(int i = 0; i < n; i++){
		if(i != k-1){
			System.out.printf(s.substring(i,i+1));
		}else{
			System.out.printf(s.substring(i,i+1).toLowerCase());
		}
	}
}
}
