/* package whatever; // don't place package name! */

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

/* Name of the class has to be "Main" only if the class is public. */
public class Main
{	
	
	
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int k = scan.nextInt();
		String s = scan.next();
		char[] a = s.toCharArray();
		if(a[k-1]>='A'&&a[k-1]<='Z'){
			a[k-1] = (char)(a[k-1]-'A'+'a');
		}
		System.out.println(a);
	}
} import java.util.*; util.* java import java.lang.*; lang.* java import java.io.*; io.* java public class Main
{	
	
	
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int k = scan.nextInt();
		String s = scan.next();
		char[] a = s.toCharArray();
		if(a[k-1]>='A'&&a[k-1]<='Z'){
			a[k-1] = (char)(a[k-1]-'A'+'a');
		}
		System.out.println(a);
	}
} Main public static void main (String[] args) throws java.lang.Exception
	{
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int k = scan.nextInt();
		String s = scan.next();
		char[] a = s.toCharArray();
		if(a[k-1]>='A'&&a[k-1]<='Z'){
			a[k-1] = (char)(a[k-1]-'A'+'a');
		}
		System.out.println(a);
	} main {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int k = scan.nextInt();
		String s = scan.next();
		char[] a = s.toCharArray();
		if(a[k-1]>='A'&&a[k-1]<='Z'){
			a[k-1] = (char)(a[k-1]-'A'+'a');
		}
		System.out.println(a);
	} 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 char[] a = s.toCharArray(); a s.toCharArray() s.toCharArray s if(a[k-1]>='A'&&a[k-1]<='Z'){
			a[k-1] = (char)(a[k-1]-'A'+'a');
		} a[k-1]>='A'&&a[k-1]<='Z' a[k-1]>='A' a[k-1] a k-1 k 1 'A' a[k-1]<='Z' a[k-1] a k-1 k 1 'Z' {
			a[k-1] = (char)(a[k-1]-'A'+'a');
		} a[k-1] = (char)(a[k-1]-'A'+'a') a[k-1] a k-1 k 1 (char)(a[k-1]-'A'+'a') a[k-1]-'A' a[k-1] a k-1 k 1 'A' 'a' System.out.println(a) System.out.println System.out System System.out a String[] args args public class Main
{	
	
	
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int k = scan.nextInt();
		String s = scan.next();
		char[] a = s.toCharArray();
		if(a[k-1]>='A'&&a[k-1]<='Z'){
			a[k-1] = (char)(a[k-1]-'A'+'a');
		}
		System.out.println(a);
	}
} public class Main
{	
	
	
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int k = scan.nextInt();
		String s = scan.next();
		char[] a = s.toCharArray();
		if(a[k-1]>='A'&&a[k-1]<='Z'){
			a[k-1] = (char)(a[k-1]-'A'+'a');
		}
		System.out.println(a);
	}
} Main
/* package whatever; // don't place package name! */

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

/* Name of the class has to be "Main" only if the class is public. */
public class Main
{	
	
	
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int k = scan.nextInt();
		String s = scan.next();
		char[] a = s.toCharArray();
		if(a[k-1]>='A'&&a[k-1]<='Z'){
			a[k-1] = (char)(a[k-1]-'A'+'a');
		}
		System.out.println(a);
	}
}