import java.util.*;

public class Main { 
	public static void main(String[] args) {
 		Scanner sc = new Scanner(System.in);
		int length = Integer.parseInt(sc.next());
        int target = Integer.parseInt(sc.next())-1;
      
      	List<String> list = new ArrayList<>();
		String s = sc.next();
      for (int x = 1; x <= length; x++) {
		list.add(s.substring(x-1,x));
      }

      String a = list.get(target);
      if(a.equals("A")) {
		list.set(target, "a");
      }else if(a.equals("B")) {
        list.set(target, "b");
      } else {
        list.set(target, "c");
      }
      
      String res = null;
      StringBuilder sb = new StringBuilder();
      for (String x:list) {
        sb.append(x);
      }
      System.out.println(sb.toString());
    }
}
      	 import java.util.*; util.* java public class Main { 
	public static void main(String[] args) {
 		Scanner sc = new Scanner(System.in);
		int length = Integer.parseInt(sc.next());
        int target = Integer.parseInt(sc.next())-1;
      
      	List<String> list = new ArrayList<>();
		String s = sc.next();
      for (int x = 1; x <= length; x++) {
		list.add(s.substring(x-1,x));
      }

      String a = list.get(target);
      if(a.equals("A")) {
		list.set(target, "a");
      }else if(a.equals("B")) {
        list.set(target, "b");
      } else {
        list.set(target, "c");
      }
      
      String res = null;
      StringBuilder sb = new StringBuilder();
      for (String x:list) {
        sb.append(x);
      }
      System.out.println(sb.toString());
    }
} Main public static void main(String[] args) {
 		Scanner sc = new Scanner(System.in);
		int length = Integer.parseInt(sc.next());
        int target = Integer.parseInt(sc.next())-1;
      
      	List<String> list = new ArrayList<>();
		String s = sc.next();
      for (int x = 1; x <= length; x++) {
		list.add(s.substring(x-1,x));
      }

      String a = list.get(target);
      if(a.equals("A")) {
		list.set(target, "a");
      }else if(a.equals("B")) {
        list.set(target, "b");
      } else {
        list.set(target, "c");
      }
      
      String res = null;
      StringBuilder sb = new StringBuilder();
      for (String x:list) {
        sb.append(x);
      }
      System.out.println(sb.toString());
    } main {
 		Scanner sc = new Scanner(System.in);
		int length = Integer.parseInt(sc.next());
        int target = Integer.parseInt(sc.next())-1;
      
      	List<String> list = new ArrayList<>();
		String s = sc.next();
      for (int x = 1; x <= length; x++) {
		list.add(s.substring(x-1,x));
      }

      String a = list.get(target);
      if(a.equals("A")) {
		list.set(target, "a");
      }else if(a.equals("B")) {
        list.set(target, "b");
      } else {
        list.set(target, "c");
      }
      
      String res = null;
      StringBuilder sb = new StringBuilder();
      for (String x:list) {
        sb.append(x);
      }
      System.out.println(sb.toString());
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int length = Integer.parseInt(sc.next()); length Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int target = Integer.parseInt(sc.next())-1; target Integer.parseInt(sc.next())-1 Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc 1 List<String> list = new ArrayList<>(); list new ArrayList<>() String s = sc.next(); s sc.next() sc.next sc for (int x = 1; x <= length; x++) {
		list.add(s.substring(x-1,x));
      } int x = 1; int x = 1; x 1 x <= length x length x++ x++ x {
		list.add(s.substring(x-1,x));
      } {
		list.add(s.substring(x-1,x));
      } list.add(s.substring(x-1,x)) list.add list s.substring(x-1,x) s.substring s x-1 x 1 x String a = list.get(target); a list.get(target) list.get list target if(a.equals("A")) {
		list.set(target, "a");
      }else if(a.equals("B")) {
        list.set(target, "b");
      } else {
        list.set(target, "c");
      } a.equals("A") a.equals a "A" {
		list.set(target, "a");
      } list.set(target, "a") list.set list target "a" if(a.equals("B")) {
        list.set(target, "b");
      } else {
        list.set(target, "c");
      } a.equals("B") a.equals a "B" {
        list.set(target, "b");
      } list.set(target, "b") list.set list target "b" {
        list.set(target, "c");
      } list.set(target, "c") list.set list target "c" String res = null; res null StringBuilder sb = new StringBuilder(); sb new StringBuilder() for (String x:list) {
        sb.append(x);
      } String x list {
        sb.append(x);
      } {
        sb.append(x);
      } sb.append(x) sb.append sb x System.out.println(sb.toString()) System.out.println System.out System System.out sb.toString() sb.toString sb String[] args args public class Main { 
	public static void main(String[] args) {
 		Scanner sc = new Scanner(System.in);
		int length = Integer.parseInt(sc.next());
        int target = Integer.parseInt(sc.next())-1;
      
      	List<String> list = new ArrayList<>();
		String s = sc.next();
      for (int x = 1; x <= length; x++) {
		list.add(s.substring(x-1,x));
      }

      String a = list.get(target);
      if(a.equals("A")) {
		list.set(target, "a");
      }else if(a.equals("B")) {
        list.set(target, "b");
      } else {
        list.set(target, "c");
      }
      
      String res = null;
      StringBuilder sb = new StringBuilder();
      for (String x:list) {
        sb.append(x);
      }
      System.out.println(sb.toString());
    }
} public class Main { 
	public static void main(String[] args) {
 		Scanner sc = new Scanner(System.in);
		int length = Integer.parseInt(sc.next());
        int target = Integer.parseInt(sc.next())-1;
      
      	List<String> list = new ArrayList<>();
		String s = sc.next();
      for (int x = 1; x <= length; x++) {
		list.add(s.substring(x-1,x));
      }

      String a = list.get(target);
      if(a.equals("A")) {
		list.set(target, "a");
      }else if(a.equals("B")) {
        list.set(target, "b");
      } else {
        list.set(target, "c");
      }
      
      String res = null;
      StringBuilder sb = new StringBuilder();
      for (String x:list) {
        sb.append(x);
      }
      System.out.println(sb.toString());
    }
} Main
import java.util.*;

public class Main { 
	public static void main(String[] args) {
 		Scanner sc = new Scanner(System.in);
		int length = Integer.parseInt(sc.next());
        int target = Integer.parseInt(sc.next())-1;
      
      	List<String> list = new ArrayList<>();
		String s = sc.next();
      for (int x = 1; x <= length; x++) {
		list.add(s.substring(x-1,x));
      }

      String a = list.get(target);
      if(a.equals("A")) {
		list.set(target, "a");
      }else if(a.equals("B")) {
        list.set(target, "b");
      } else {
        list.set(target, "c");
      }
      
      String res = null;
      StringBuilder sb = new StringBuilder();
      for (String x:list) {
        sb.append(x);
      }
      System.out.println(sb.toString());
    }
}
      	