import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main{
	public static void main(String[] args) throws IOException {
		try (BufferedReader br = new BufferedReader(
				new InputStreamReader(System.in))) {

			String in = br.readLine();
			String inp = br.readLine();
			String chr[] = in.split(" ");
			String s[] = inp.split("");
			int n = Integer.parseInt(chr[0]);
			int k = Integer.parseInt(chr[1]);
			String ans ="";
			for(int i =0; i<n;i++) {
				if(i==k-1) {
					s[i]=s[i].toLowerCase();
				}
				ans+=s[i];
			}
			 System.out.println(ans);
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main{
	public static void main(String[] args) throws IOException {
		try (BufferedReader br = new BufferedReader(
				new InputStreamReader(System.in))) {

			String in = br.readLine();
			String inp = br.readLine();
			String chr[] = in.split(" ");
			String s[] = inp.split("");
			int n = Integer.parseInt(chr[0]);
			int k = Integer.parseInt(chr[1]);
			String ans ="";
			for(int i =0; i<n;i++) {
				if(i==k-1) {
					s[i]=s[i].toLowerCase();
				}
				ans+=s[i];
			}
			 System.out.println(ans);
		}
	}
} Main public static void main(String[] args) throws IOException {
		try (BufferedReader br = new BufferedReader(
				new InputStreamReader(System.in))) {

			String in = br.readLine();
			String inp = br.readLine();
			String chr[] = in.split(" ");
			String s[] = inp.split("");
			int n = Integer.parseInt(chr[0]);
			int k = Integer.parseInt(chr[1]);
			String ans ="";
			for(int i =0; i<n;i++) {
				if(i==k-1) {
					s[i]=s[i].toLowerCase();
				}
				ans+=s[i];
			}
			 System.out.println(ans);
		}
	} main {
		try (BufferedReader br = new BufferedReader(
				new InputStreamReader(System.in))) {

			String in = br.readLine();
			String inp = br.readLine();
			String chr[] = in.split(" ");
			String s[] = inp.split("");
			int n = Integer.parseInt(chr[0]);
			int k = Integer.parseInt(chr[1]);
			String ans ="";
			for(int i =0; i<n;i++) {
				if(i==k-1) {
					s[i]=s[i].toLowerCase();
				}
				ans+=s[i];
			}
			 System.out.println(ans);
		}
	} try (BufferedReader br = new BufferedReader(
				new InputStreamReader(System.in))) {

			String in = br.readLine();
			String inp = br.readLine();
			String chr[] = in.split(" ");
			String s[] = inp.split("");
			int n = Integer.parseInt(chr[0]);
			int k = Integer.parseInt(chr[1]);
			String ans ="";
			for(int i =0; i<n;i++) {
				if(i==k-1) {
					s[i]=s[i].toLowerCase();
				}
				ans+=s[i];
			}
			 System.out.println(ans);
		} {

			String in = br.readLine();
			String inp = br.readLine();
			String chr[] = in.split(" ");
			String s[] = inp.split("");
			int n = Integer.parseInt(chr[0]);
			int k = Integer.parseInt(chr[1]);
			String ans ="";
			for(int i =0; i<n;i++) {
				if(i==k-1) {
					s[i]=s[i].toLowerCase();
				}
				ans+=s[i];
			}
			 System.out.println(ans);
		} BufferedReader br = new BufferedReader(
				new InputStreamReader(System.in)) BufferedReader br = new BufferedReader(
				new InputStreamReader(System.in)) new BufferedReader(
				new InputStreamReader(System.in)) String in = br.readLine(); in br.readLine() br.readLine br String inp = br.readLine(); inp br.readLine() br.readLine br String chr[] = in.split(" "); chr in.split(" ") in.split in " " String s[] = inp.split(""); s inp.split("") inp.split inp "" int n = Integer.parseInt(chr[0]); n Integer.parseInt(chr[0]) Integer.parseInt Integer chr[0] chr 0 int k = Integer.parseInt(chr[1]); k Integer.parseInt(chr[1]) Integer.parseInt Integer chr[1] chr 1 String ans =""; ans "" for(int i =0; i<n;i++) {
				if(i==k-1) {
					s[i]=s[i].toLowerCase();
				}
				ans+=s[i];
			} int i =0; int i =0; i 0 i<n i n i++ i++ i {
				if(i==k-1) {
					s[i]=s[i].toLowerCase();
				}
				ans+=s[i];
			} {
				if(i==k-1) {
					s[i]=s[i].toLowerCase();
				}
				ans+=s[i];
			} if(i==k-1) {
					s[i]=s[i].toLowerCase();
				} i==k-1 i k-1 k 1 {
					s[i]=s[i].toLowerCase();
				} s[i]=s[i].toLowerCase() s[i] s i s[i].toLowerCase() s[i].toLowerCase s[i] s i ans+=s[i] ans s[i] s i System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main{
	public static void main(String[] args) throws IOException {
		try (BufferedReader br = new BufferedReader(
				new InputStreamReader(System.in))) {

			String in = br.readLine();
			String inp = br.readLine();
			String chr[] = in.split(" ");
			String s[] = inp.split("");
			int n = Integer.parseInt(chr[0]);
			int k = Integer.parseInt(chr[1]);
			String ans ="";
			for(int i =0; i<n;i++) {
				if(i==k-1) {
					s[i]=s[i].toLowerCase();
				}
				ans+=s[i];
			}
			 System.out.println(ans);
		}
	}
} public class Main{
	public static void main(String[] args) throws IOException {
		try (BufferedReader br = new BufferedReader(
				new InputStreamReader(System.in))) {

			String in = br.readLine();
			String inp = br.readLine();
			String chr[] = in.split(" ");
			String s[] = inp.split("");
			int n = Integer.parseInt(chr[0]);
			int k = Integer.parseInt(chr[1]);
			String ans ="";
			for(int i =0; i<n;i++) {
				if(i==k-1) {
					s[i]=s[i].toLowerCase();
				}
				ans+=s[i];
			}
			 System.out.println(ans);
		}
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main{
	public static void main(String[] args) throws IOException {
		try (BufferedReader br = new BufferedReader(
				new InputStreamReader(System.in))) {

			String in = br.readLine();
			String inp = br.readLine();
			String chr[] = in.split(" ");
			String s[] = inp.split("");
			int n = Integer.parseInt(chr[0]);
			int k = Integer.parseInt(chr[1]);
			String ans ="";
			for(int i =0; i<n;i++) {
				if(i==k-1) {
					s[i]=s[i].toLowerCase();
				}
				ans+=s[i];
			}
			 System.out.println(ans);
		}
	}
}