import java.util.*;
import java.io.*;
import java.math.*;
public class Main{
    public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		int n = Integer.parseInt(sc.next());
		int k = Integer.parseInt(sc.next()) - 1;
		char[] s = sc.next().toCharArray();
		s[k] += 32;
		for(int i = 0 ; i < n ; i++) ou.print(s[i]);
		ou.println();
		ou.flush();
	}
} import java.util.*; util.* java import java.io.*; io.* java import java.math.*; math.* java public class Main{
    public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		int n = Integer.parseInt(sc.next());
		int k = Integer.parseInt(sc.next()) - 1;
		char[] s = sc.next().toCharArray();
		s[k] += 32;
		for(int i = 0 ; i < n ; i++) ou.print(s[i]);
		ou.println();
		ou.flush();
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		int n = Integer.parseInt(sc.next());
		int k = Integer.parseInt(sc.next()) - 1;
		char[] s = sc.next().toCharArray();
		s[k] += 32;
		for(int i = 0 ; i < n ; i++) ou.print(s[i]);
		ou.println();
		ou.flush();
	} main {
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		int n = Integer.parseInt(sc.next());
		int k = Integer.parseInt(sc.next()) - 1;
		char[] s = sc.next().toCharArray();
		s[k] += 32;
		for(int i = 0 ; i < n ; i++) ou.print(s[i]);
		ou.println();
		ou.flush();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) PrintWriter ou = new PrintWriter(System.out); ou new PrintWriter(System.out) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int k = Integer.parseInt(sc.next()) - 1; k Integer.parseInt(sc.next()) - 1 Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc 1 char[] s = sc.next().toCharArray(); s sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc s[k] += 32 s[k] s k 32 for(int i = 0 ; i < n ; i++) ou.print(s[i]); int i = 0 ; int i = 0 ; i 0 i < n i n i++ i++ i ou.print(s[i]); ou.print(s[i]) ou.print ou s[i] s i ou.println() ou.println ou ou.flush() ou.flush ou String[] args args public class Main{
    public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		int n = Integer.parseInt(sc.next());
		int k = Integer.parseInt(sc.next()) - 1;
		char[] s = sc.next().toCharArray();
		s[k] += 32;
		for(int i = 0 ; i < n ; i++) ou.print(s[i]);
		ou.println();
		ou.flush();
	}
} public class Main{
    public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		int n = Integer.parseInt(sc.next());
		int k = Integer.parseInt(sc.next()) - 1;
		char[] s = sc.next().toCharArray();
		s[k] += 32;
		for(int i = 0 ; i < n ; i++) ou.print(s[i]);
		ou.println();
		ou.flush();
	}
} Main
import java.util.*;
import java.io.*;
import java.math.*;
public class Main{
    public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		int n = Integer.parseInt(sc.next());
		int k = Integer.parseInt(sc.next()) - 1;
		char[] s = sc.next().toCharArray();
		s[k] += 32;
		for(int i = 0 ; i < n ; i++) ou.print(s[i]);
		ou.println();
		ou.flush();
	}
}