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();

    sc.close();
    
    String[] S = s_.split("");

    for (int i = 0; i < S.length; i++) {
      if (i == K - 1) {
        if (S[i].equals("A")) {
          S[i] = "a";
        }
        if (S[i].equals("B")) {
          S[i] = "b";
        }
        if (S[i].equals("C")) {
          S[i] = "c";
        }
      }
    }

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

    System.out.println("");

  }

} 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();

    sc.close();
    
    String[] S = s_.split("");

    for (int i = 0; i < S.length; i++) {
      if (i == K - 1) {
        if (S[i].equals("A")) {
          S[i] = "a";
        }
        if (S[i].equals("B")) {
          S[i] = "b";
        }
        if (S[i].equals("C")) {
          S[i] = "c";
        }
      }
    }

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

    System.out.println("");

  }

} 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();

    sc.close();
    
    String[] S = s_.split("");

    for (int i = 0; i < S.length; i++) {
      if (i == K - 1) {
        if (S[i].equals("A")) {
          S[i] = "a";
        }
        if (S[i].equals("B")) {
          S[i] = "b";
        }
        if (S[i].equals("C")) {
          S[i] = "c";
        }
      }
    }

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

    System.out.println("");

  } main {

    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();
    int K = sc.nextInt();
    String s_ = sc.next();

    sc.close();
    
    String[] S = s_.split("");

    for (int i = 0; i < S.length; i++) {
      if (i == K - 1) {
        if (S[i].equals("A")) {
          S[i] = "a";
        }
        if (S[i].equals("B")) {
          S[i] = "b";
        }
        if (S[i].equals("C")) {
          S[i] = "c";
        }
      }
    }

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

    System.out.println("");

  } 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 sc.close() sc.close sc String[] S = s_.split(""); S s_.split("") s_.split s_ "" for (int i = 0; i < S.length; i++) {
      if (i == K - 1) {
        if (S[i].equals("A")) {
          S[i] = "a";
        }
        if (S[i].equals("B")) {
          S[i] = "b";
        }
        if (S[i].equals("C")) {
          S[i] = "c";
        }
      }
    } int i = 0; int i = 0; i 0 i < S.length i S.length S S.length i++ i++ i {
      if (i == K - 1) {
        if (S[i].equals("A")) {
          S[i] = "a";
        }
        if (S[i].equals("B")) {
          S[i] = "b";
        }
        if (S[i].equals("C")) {
          S[i] = "c";
        }
      }
    } {
      if (i == K - 1) {
        if (S[i].equals("A")) {
          S[i] = "a";
        }
        if (S[i].equals("B")) {
          S[i] = "b";
        }
        if (S[i].equals("C")) {
          S[i] = "c";
        }
      }
    } if (i == K - 1) {
        if (S[i].equals("A")) {
          S[i] = "a";
        }
        if (S[i].equals("B")) {
          S[i] = "b";
        }
        if (S[i].equals("C")) {
          S[i] = "c";
        }
      } i == K - 1 i K - 1 K 1 {
        if (S[i].equals("A")) {
          S[i] = "a";
        }
        if (S[i].equals("B")) {
          S[i] = "b";
        }
        if (S[i].equals("C")) {
          S[i] = "c";
        }
      } if (S[i].equals("A")) {
          S[i] = "a";
        } S[i].equals("A") S[i].equals S[i] S i "A" {
          S[i] = "a";
        } S[i] = "a" S[i] S i "a" if (S[i].equals("B")) {
          S[i] = "b";
        } S[i].equals("B") S[i].equals S[i] S i "B" {
          S[i] = "b";
        } S[i] = "b" S[i] S i "b" if (S[i].equals("C")) {
          S[i] = "c";
        } S[i].equals("C") S[i].equals S[i] S i "C" {
          S[i] = "c";
        } S[i] = "c" S[i] S i "c" for (int i = 0; i < S.length; i++) {
      System.out.print(S[i]);
    } int i = 0; int i = 0; i 0 i < S.length i S.length S S.length i++ i++ i {
      System.out.print(S[i]);
    } {
      System.out.print(S[i]);
    } System.out.print(S[i]) System.out.print System.out System System.out S[i] S i System.out.println("") System.out.println System.out System System.out "" 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();

    sc.close();
    
    String[] S = s_.split("");

    for (int i = 0; i < S.length; i++) {
      if (i == K - 1) {
        if (S[i].equals("A")) {
          S[i] = "a";
        }
        if (S[i].equals("B")) {
          S[i] = "b";
        }
        if (S[i].equals("C")) {
          S[i] = "c";
        }
      }
    }

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

    System.out.println("");

  }

} 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();

    sc.close();
    
    String[] S = s_.split("");

    for (int i = 0; i < S.length; i++) {
      if (i == K - 1) {
        if (S[i].equals("A")) {
          S[i] = "a";
        }
        if (S[i].equals("B")) {
          S[i] = "b";
        }
        if (S[i].equals("C")) {
          S[i] = "c";
        }
      }
    }

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

    System.out.println("");

  }

} 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();

    sc.close();
    
    String[] S = s_.split("");

    for (int i = 0; i < S.length; i++) {
      if (i == K - 1) {
        if (S[i].equals("A")) {
          S[i] = "a";
        }
        if (S[i].equals("B")) {
          S[i] = "b";
        }
        if (S[i].equals("C")) {
          S[i] = "c";
        }
      }
    }

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

    System.out.println("");

  }

}