import java.util.*;
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();
        int p=S.charAt(K-1);
        char x=(char)(p+32);
System.out.print(S.substring(0,(K-1))+x+S.substring(K));
}
} import java.util.*; util.* 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();
        int p=S.charAt(K-1);
        char x=(char)(p+32);
System.out.print(S.substring(0,(K-1))+x+S.substring(K));
}
} 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();
        int p=S.charAt(K-1);
        char x=(char)(p+32);
System.out.print(S.substring(0,(K-1))+x+S.substring(K));
} main {
        Scanner sc=new Scanner(System.in);
        int  n=sc.nextInt();
        int K=sc.nextInt();
        String S=sc.next();
        int p=S.charAt(K-1);
        char x=(char)(p+32);
System.out.print(S.substring(0,(K-1))+x+S.substring(K));
} 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 int p=S.charAt(K-1); p S.charAt(K-1) S.charAt S K-1 K 1 char x=(char)(p+32); x (char)(p+32) p 32 System.out.print(S.substring(0,(K-1))+x+S.substring(K)) System.out.print System.out System System.out S.substring(0,(K-1))+x+S.substring(K) S.substring(0,(K-1))+x+S.substring(K) S.substring(0,(K-1)) S.substring S 0 (K-1) K 1 x S.substring(K) S.substring S K 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();
        int p=S.charAt(K-1);
        char x=(char)(p+32);
System.out.print(S.substring(0,(K-1))+x+S.substring(K));
}
} 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();
        int p=S.charAt(K-1);
        char x=(char)(p+32);
System.out.print(S.substring(0,(K-1))+x+S.substring(K));
}
} Main
import java.util.*;
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();
        int p=S.charAt(K-1);
        char x=(char)(p+32);
System.out.print(S.substring(0,(K-1))+x+S.substring(K));
}
}
