import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    final int N=sc.nextInt();
    final int K=sc.nextInt();
    final String S=sc.next();
    char[] s=S.toCharArray();
    switch(s[K-1]){
      case 'A':
        s[K-1]='a';
        break;
      case 'B':
        s[K-1]='b';
        break;
      case 'C':
        s[K-1]='c';
        break;
    }
    System.out.println(String.valueOf(s));
  }
} import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    final int N=sc.nextInt();
    final int K=sc.nextInt();
    final String S=sc.next();
    char[] s=S.toCharArray();
    switch(s[K-1]){
      case 'A':
        s[K-1]='a';
        break;
      case 'B':
        s[K-1]='b';
        break;
      case 'C':
        s[K-1]='c';
        break;
    }
    System.out.println(String.valueOf(s));
  }
} Main public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    final int N=sc.nextInt();
    final int K=sc.nextInt();
    final String S=sc.next();
    char[] s=S.toCharArray();
    switch(s[K-1]){
      case 'A':
        s[K-1]='a';
        break;
      case 'B':
        s[K-1]='b';
        break;
      case 'C':
        s[K-1]='c';
        break;
    }
    System.out.println(String.valueOf(s));
  } main {
    Scanner sc=new Scanner(System.in);
    final int N=sc.nextInt();
    final int K=sc.nextInt();
    final String S=sc.next();
    char[] s=S.toCharArray();
    switch(s[K-1]){
      case 'A':
        s[K-1]='a';
        break;
      case 'B':
        s[K-1]='b';
        break;
      case 'C':
        s[K-1]='c';
        break;
    }
    System.out.println(String.valueOf(s));
  } Scanner sc=new Scanner(System.in); sc new Scanner(System.in) final int N=sc.nextInt(); N sc.nextInt() sc.nextInt sc final int K=sc.nextInt(); K sc.nextInt() sc.nextInt sc final String S=sc.next(); S sc.next() sc.next sc char[] s=S.toCharArray(); s S.toCharArray() S.toCharArray S switch(s[K-1]){
      case 'A':
        s[K-1]='a';
        break;
      case 'B':
        s[K-1]='b';
        break;
      case 'C':
        s[K-1]='c';
        break;
    } s[K-1] s K-1 K 1 case 'A': 'A' case 'A': s[K-1]='a' s[K-1] s K-1 K 1 'a' break; case 'B': 'B' case 'B': s[K-1]='b' s[K-1] s K-1 K 1 'b' break; case 'C': 'C' case 'C': s[K-1]='c' s[K-1] s K-1 K 1 'c' break; System.out.println(String.valueOf(s)) System.out.println System.out System System.out String.valueOf(s) String.valueOf String s String[] args args public class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    final int N=sc.nextInt();
    final int K=sc.nextInt();
    final String S=sc.next();
    char[] s=S.toCharArray();
    switch(s[K-1]){
      case 'A':
        s[K-1]='a';
        break;
      case 'B':
        s[K-1]='b';
        break;
      case 'C':
        s[K-1]='c';
        break;
    }
    System.out.println(String.valueOf(s));
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    final int N=sc.nextInt();
    final int K=sc.nextInt();
    final String S=sc.next();
    char[] s=S.toCharArray();
    switch(s[K-1]){
      case 'A':
        s[K-1]='a';
        break;
      case 'B':
        s[K-1]='b';
        break;
      case 'C':
        s[K-1]='c';
        break;
    }
    System.out.println(String.valueOf(s));
  }
} Main
import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    final int N=sc.nextInt();
    final int K=sc.nextInt();
    final String S=sc.next();
    char[] s=S.toCharArray();
    switch(s[K-1]){
      case 'A':
        s[K-1]='a';
        break;
      case 'B':
        s[K-1]='b';
        break;
      case 'C':
        s[K-1]='c';
        break;
    }
    System.out.println(String.valueOf(s));
  }
}