import java.util.*;

public class Main {

  public static void main(String args[]) {
    int rep = 1;
    if( args.length > 0 ) { rep = Integer.parseInt(args[0]); }
    (new Main()).__solve(rep);
  }

  void __solve(int rep) {

    try (
      Scanner cin = new Scanner(System.in);
    ) {

      for( int i = 0; i < rep; ++i ) {
        __solve(cin);
      }

    }

  }

  void __solve(Scanner cin) {
	  int N = cin.nextInt();
	  int K = cin.nextInt();
	  String s = cin.next();
	  String ans = "";
	  for( int i = 0; i < N; ++i ) {
		  if( i + 1 == K ) {
			  ans += (char)(s.charAt(i) - 'A' + 'a');
		  }
		  else {
			  ans += s.charAt(i);
		  }
	  }
	  System.out.println(ans);
  }

} import java.util.*; util.* java public class Main {

  public static void main(String args[]) {
    int rep = 1;
    if( args.length > 0 ) { rep = Integer.parseInt(args[0]); }
    (new Main()).__solve(rep);
  }

  void __solve(int rep) {

    try (
      Scanner cin = new Scanner(System.in);
    ) {

      for( int i = 0; i < rep; ++i ) {
        __solve(cin);
      }

    }

  }

  void __solve(Scanner cin) {
	  int N = cin.nextInt();
	  int K = cin.nextInt();
	  String s = cin.next();
	  String ans = "";
	  for( int i = 0; i < N; ++i ) {
		  if( i + 1 == K ) {
			  ans += (char)(s.charAt(i) - 'A' + 'a');
		  }
		  else {
			  ans += s.charAt(i);
		  }
	  }
	  System.out.println(ans);
  }

} Main public static void main(String args[]) {
    int rep = 1;
    if( args.length > 0 ) { rep = Integer.parseInt(args[0]); }
    (new Main()).__solve(rep);
  } main {
    int rep = 1;
    if( args.length > 0 ) { rep = Integer.parseInt(args[0]); }
    (new Main()).__solve(rep);
  } int rep = 1; rep 1 if( args.length > 0 ) { rep = Integer.parseInt(args[0]); } args.length > 0 args.length args args.length 0 { rep = Integer.parseInt(args[0]); } rep = Integer.parseInt(args[0]) rep Integer.parseInt(args[0]) Integer.parseInt Integer args[0] args 0 (new Main()).__solve(rep) (new Main()).__solve (new Main()) rep String args[] args void __solve(int rep) {

    try (
      Scanner cin = new Scanner(System.in);
    ) {

      for( int i = 0; i < rep; ++i ) {
        __solve(cin);
      }

    }

  } __solve {

    try (
      Scanner cin = new Scanner(System.in);
    ) {

      for( int i = 0; i < rep; ++i ) {
        __solve(cin);
      }

    }

  } try (
      Scanner cin = new Scanner(System.in);
    ) {

      for( int i = 0; i < rep; ++i ) {
        __solve(cin);
      }

    } {

      for( int i = 0; i < rep; ++i ) {
        __solve(cin);
      }

    } Scanner cin = new Scanner(System.in) Scanner cin = new Scanner(System.in) new Scanner(System.in) for( int i = 0; i < rep; ++i ) {
        __solve(cin);
      } int i = 0; int i = 0; i 0 i < rep i rep ++i ++i i {
        __solve(cin);
      } {
        __solve(cin);
      } __solve(cin) __solve cin int rep rep void __solve(Scanner cin) {
	  int N = cin.nextInt();
	  int K = cin.nextInt();
	  String s = cin.next();
	  String ans = "";
	  for( int i = 0; i < N; ++i ) {
		  if( i + 1 == K ) {
			  ans += (char)(s.charAt(i) - 'A' + 'a');
		  }
		  else {
			  ans += s.charAt(i);
		  }
	  }
	  System.out.println(ans);
  } __solve {
	  int N = cin.nextInt();
	  int K = cin.nextInt();
	  String s = cin.next();
	  String ans = "";
	  for( int i = 0; i < N; ++i ) {
		  if( i + 1 == K ) {
			  ans += (char)(s.charAt(i) - 'A' + 'a');
		  }
		  else {
			  ans += s.charAt(i);
		  }
	  }
	  System.out.println(ans);
  } int N = cin.nextInt(); N cin.nextInt() cin.nextInt cin int K = cin.nextInt(); K cin.nextInt() cin.nextInt cin String s = cin.next(); s cin.next() cin.next cin String ans = ""; ans "" for( int i = 0; i < N; ++i ) {
		  if( i + 1 == K ) {
			  ans += (char)(s.charAt(i) - 'A' + 'a');
		  }
		  else {
			  ans += s.charAt(i);
		  }
	  } int i = 0; int i = 0; i 0 i < N i N ++i ++i i {
		  if( i + 1 == K ) {
			  ans += (char)(s.charAt(i) - 'A' + 'a');
		  }
		  else {
			  ans += s.charAt(i);
		  }
	  } {
		  if( i + 1 == K ) {
			  ans += (char)(s.charAt(i) - 'A' + 'a');
		  }
		  else {
			  ans += s.charAt(i);
		  }
	  } if( i + 1 == K ) {
			  ans += (char)(s.charAt(i) - 'A' + 'a');
		  }
		  else {
			  ans += s.charAt(i);
		  } i + 1 == K i + 1 i 1 K {
			  ans += (char)(s.charAt(i) - 'A' + 'a');
		  } ans += (char)(s.charAt(i) - 'A' + 'a') ans (char)(s.charAt(i) - 'A' + 'a') s.charAt(i) - 'A' s.charAt(i) s.charAt s i 'A' 'a' {
			  ans += s.charAt(i);
		  } ans += s.charAt(i) ans s.charAt(i) s.charAt s i System.out.println(ans) System.out.println System.out System System.out ans Scanner cin cin public class Main {

  public static void main(String args[]) {
    int rep = 1;
    if( args.length > 0 ) { rep = Integer.parseInt(args[0]); }
    (new Main()).__solve(rep);
  }

  void __solve(int rep) {

    try (
      Scanner cin = new Scanner(System.in);
    ) {

      for( int i = 0; i < rep; ++i ) {
        __solve(cin);
      }

    }

  }

  void __solve(Scanner cin) {
	  int N = cin.nextInt();
	  int K = cin.nextInt();
	  String s = cin.next();
	  String ans = "";
	  for( int i = 0; i < N; ++i ) {
		  if( i + 1 == K ) {
			  ans += (char)(s.charAt(i) - 'A' + 'a');
		  }
		  else {
			  ans += s.charAt(i);
		  }
	  }
	  System.out.println(ans);
  }

} public class Main {

  public static void main(String args[]) {
    int rep = 1;
    if( args.length > 0 ) { rep = Integer.parseInt(args[0]); }
    (new Main()).__solve(rep);
  }

  void __solve(int rep) {

    try (
      Scanner cin = new Scanner(System.in);
    ) {

      for( int i = 0; i < rep; ++i ) {
        __solve(cin);
      }

    }

  }

  void __solve(Scanner cin) {
	  int N = cin.nextInt();
	  int K = cin.nextInt();
	  String s = cin.next();
	  String ans = "";
	  for( int i = 0; i < N; ++i ) {
		  if( i + 1 == K ) {
			  ans += (char)(s.charAt(i) - 'A' + 'a');
		  }
		  else {
			  ans += s.charAt(i);
		  }
	  }
	  System.out.println(ans);
  }

} Main
import java.util.*;

public class Main {

  public static void main(String args[]) {
    int rep = 1;
    if( args.length > 0 ) { rep = Integer.parseInt(args[0]); }
    (new Main()).__solve(rep);
  }

  void __solve(int rep) {

    try (
      Scanner cin = new Scanner(System.in);
    ) {

      for( int i = 0; i < rep; ++i ) {
        __solve(cin);
      }

    }

  }

  void __solve(Scanner cin) {
	  int N = cin.nextInt();
	  int K = cin.nextInt();
	  String s = cin.next();
	  String ans = "";
	  for( int i = 0; i < N; ++i ) {
		  if( i + 1 == K ) {
			  ans += (char)(s.charAt(i) - 'A' + 'a');
		  }
		  else {
			  ans += s.charAt(i);
		  }
	  }
	  System.out.println(ans);
  }

}
