import java.io.*;

class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		BufferedReader r = new BufferedReader (new InputStreamReader (System.in));
		String s1 = r.readLine();
		int index = Integer.valueOf(s1.split(" ")[1]) - 1;
		char[] s2 = r.readLine().toCharArray();
		char c = s2[index];
		s2[index] = Character.isUpperCase(c) ? Character.toLowerCase(c) : Character.toUpperCase(c);
		System.out.println(new String(s2));
	}
} import java.io.*; io.* java class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		BufferedReader r = new BufferedReader (new InputStreamReader (System.in));
		String s1 = r.readLine();
		int index = Integer.valueOf(s1.split(" ")[1]) - 1;
		char[] s2 = r.readLine().toCharArray();
		char c = s2[index];
		s2[index] = Character.isUpperCase(c) ? Character.toLowerCase(c) : Character.toUpperCase(c);
		System.out.println(new String(s2));
	}
} Main public static void main (String[] args) throws java.lang.Exception
	{
		BufferedReader r = new BufferedReader (new InputStreamReader (System.in));
		String s1 = r.readLine();
		int index = Integer.valueOf(s1.split(" ")[1]) - 1;
		char[] s2 = r.readLine().toCharArray();
		char c = s2[index];
		s2[index] = Character.isUpperCase(c) ? Character.toLowerCase(c) : Character.toUpperCase(c);
		System.out.println(new String(s2));
	} main {
		BufferedReader r = new BufferedReader (new InputStreamReader (System.in));
		String s1 = r.readLine();
		int index = Integer.valueOf(s1.split(" ")[1]) - 1;
		char[] s2 = r.readLine().toCharArray();
		char c = s2[index];
		s2[index] = Character.isUpperCase(c) ? Character.toLowerCase(c) : Character.toUpperCase(c);
		System.out.println(new String(s2));
	} BufferedReader r = new BufferedReader (new InputStreamReader (System.in)); r new BufferedReader (new InputStreamReader (System.in)) String s1 = r.readLine(); s1 r.readLine() r.readLine r int index = Integer.valueOf(s1.split(" ")[1]) - 1; index Integer.valueOf(s1.split(" ")[1]) - 1 Integer.valueOf(s1.split(" ")[1]) Integer.valueOf Integer s1.split(" ")[1] s1.split(" ") s1.split s1 " " 1 1 char[] s2 = r.readLine().toCharArray(); s2 r.readLine().toCharArray() r.readLine().toCharArray r.readLine() r.readLine r char c = s2[index]; c s2[index] s2 index s2[index] = Character.isUpperCase(c) ? Character.toLowerCase(c) : Character.toUpperCase(c) s2[index] s2 index Character.isUpperCase(c) ? Character.toLowerCase(c) : Character.toUpperCase(c) Character.isUpperCase(c) Character.isUpperCase Character c Character.toLowerCase(c) Character.toLowerCase Character c Character.toUpperCase(c) Character.toUpperCase Character c System.out.println(new String(s2)) System.out.println System.out System System.out new String(s2) String[] args args
import java.io.*;

class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		BufferedReader r = new BufferedReader (new InputStreamReader (System.in));
		String s1 = r.readLine();
		int index = Integer.valueOf(s1.split(" ")[1]) - 1;
		char[] s2 = r.readLine().toCharArray();
		char c = s2[index];
		s2[index] = Character.isUpperCase(c) ? Character.toLowerCase(c) : Character.toUpperCase(c);
		System.out.println(new String(s2));
	}
}