import java.util.*;

public class Main{
    public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);

      int n = Integer.parseInt(sc.next());
      int k = Integer.parseInt(sc.next());

      String s = sc.next();
      int lng = s.length();
      char[] c = new char[lng];
      for(int i=0;i<lng;i++){
        c[i] = s.charAt(i);
      }

      if(c[k-1]=='A'){
        c[k-1] = 'a';
      }
      if(c[k-1]=='B'){
        c[k-1] = 'b';
      }
      if(c[k-1]=='C'){
        c[k-1] = 'c';
      }

      for(int i=0;i<lng;i++){
        System.out.print(c[i]);
      }

    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);

      int n = Integer.parseInt(sc.next());
      int k = Integer.parseInt(sc.next());

      String s = sc.next();
      int lng = s.length();
      char[] c = new char[lng];
      for(int i=0;i<lng;i++){
        c[i] = s.charAt(i);
      }

      if(c[k-1]=='A'){
        c[k-1] = 'a';
      }
      if(c[k-1]=='B'){
        c[k-1] = 'b';
      }
      if(c[k-1]=='C'){
        c[k-1] = 'c';
      }

      for(int i=0;i<lng;i++){
        System.out.print(c[i]);
      }

    }
} Main public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);

      int n = Integer.parseInt(sc.next());
      int k = Integer.parseInt(sc.next());

      String s = sc.next();
      int lng = s.length();
      char[] c = new char[lng];
      for(int i=0;i<lng;i++){
        c[i] = s.charAt(i);
      }

      if(c[k-1]=='A'){
        c[k-1] = 'a';
      }
      if(c[k-1]=='B'){
        c[k-1] = 'b';
      }
      if(c[k-1]=='C'){
        c[k-1] = 'c';
      }

      for(int i=0;i<lng;i++){
        System.out.print(c[i]);
      }

    } main {
      Scanner sc = new Scanner(System.in);

      int n = Integer.parseInt(sc.next());
      int k = Integer.parseInt(sc.next());

      String s = sc.next();
      int lng = s.length();
      char[] c = new char[lng];
      for(int i=0;i<lng;i++){
        c[i] = s.charAt(i);
      }

      if(c[k-1]=='A'){
        c[k-1] = 'a';
      }
      if(c[k-1]=='B'){
        c[k-1] = 'b';
      }
      if(c[k-1]=='C'){
        c[k-1] = 'c';
      }

      for(int i=0;i<lng;i++){
        System.out.print(c[i]);
      }

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) 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()); k Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc String s = sc.next(); s sc.next() sc.next sc int lng = s.length(); lng s.length() s.length s char[] c = new char[lng]; c new char[lng] lng for(int i=0;i<lng;i++){
        c[i] = s.charAt(i);
      } int i=0; int i=0; i 0 i<lng i lng i++ i++ i {
        c[i] = s.charAt(i);
      } {
        c[i] = s.charAt(i);
      } c[i] = s.charAt(i) c[i] c i s.charAt(i) s.charAt s i if(c[k-1]=='A'){
        c[k-1] = 'a';
      } c[k-1]=='A' c[k-1] c k-1 k 1 'A' {
        c[k-1] = 'a';
      } c[k-1] = 'a' c[k-1] c k-1 k 1 'a' if(c[k-1]=='B'){
        c[k-1] = 'b';
      } c[k-1]=='B' c[k-1] c k-1 k 1 'B' {
        c[k-1] = 'b';
      } c[k-1] = 'b' c[k-1] c k-1 k 1 'b' if(c[k-1]=='C'){
        c[k-1] = 'c';
      } c[k-1]=='C' c[k-1] c k-1 k 1 'C' {
        c[k-1] = 'c';
      } c[k-1] = 'c' c[k-1] c k-1 k 1 'c' for(int i=0;i<lng;i++){
        System.out.print(c[i]);
      } int i=0; int i=0; i 0 i<lng i lng i++ i++ i {
        System.out.print(c[i]);
      } {
        System.out.print(c[i]);
      } System.out.print(c[i]) System.out.print System.out System System.out c[i] c i String[] args args public class Main{
    public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);

      int n = Integer.parseInt(sc.next());
      int k = Integer.parseInt(sc.next());

      String s = sc.next();
      int lng = s.length();
      char[] c = new char[lng];
      for(int i=0;i<lng;i++){
        c[i] = s.charAt(i);
      }

      if(c[k-1]=='A'){
        c[k-1] = 'a';
      }
      if(c[k-1]=='B'){
        c[k-1] = 'b';
      }
      if(c[k-1]=='C'){
        c[k-1] = 'c';
      }

      for(int i=0;i<lng;i++){
        System.out.print(c[i]);
      }

    }
} public class Main{
    public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);

      int n = Integer.parseInt(sc.next());
      int k = Integer.parseInt(sc.next());

      String s = sc.next();
      int lng = s.length();
      char[] c = new char[lng];
      for(int i=0;i<lng;i++){
        c[i] = s.charAt(i);
      }

      if(c[k-1]=='A'){
        c[k-1] = 'a';
      }
      if(c[k-1]=='B'){
        c[k-1] = 'b';
      }
      if(c[k-1]=='C'){
        c[k-1] = 'c';
      }

      for(int i=0;i<lng;i++){
        System.out.print(c[i]);
      }

    }
} Main
import java.util.*;

public class Main{
    public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);

      int n = Integer.parseInt(sc.next());
      int k = Integer.parseInt(sc.next());

      String s = sc.next();
      int lng = s.length();
      char[] c = new char[lng];
      for(int i=0;i<lng;i++){
        c[i] = s.charAt(i);
      }

      if(c[k-1]=='A'){
        c[k-1] = 'a';
      }
      if(c[k-1]=='B'){
        c[k-1] = 'b';
      }
      if(c[k-1]=='C'){
        c[k-1] = 'c';
      }

      for(int i=0;i<lng;i++){
        System.out.print(c[i]);
      }

    }
}
