import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		int N = 0;
		int K = 0;
		String S;
		Scanner sc = new Scanner(System.in);
		N = Integer.parseInt(sc.next());
		K = Integer.parseInt(sc.next());
		S = sc.next();
		StringBuilder sb = new StringBuilder();
		sb.append(S);
		char s;
		String lower;
		s = sb.charAt(K-1);
		lower=String.valueOf(s);
		sb.setCharAt(K-1, (lower.toLowerCase()).toCharArray()[0]);
		System.out.println(sb.toString());

	}

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

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		int N = 0;
		int K = 0;
		String S;
		Scanner sc = new Scanner(System.in);
		N = Integer.parseInt(sc.next());
		K = Integer.parseInt(sc.next());
		S = sc.next();
		StringBuilder sb = new StringBuilder();
		sb.append(S);
		char s;
		String lower;
		s = sb.charAt(K-1);
		lower=String.valueOf(s);
		sb.setCharAt(K-1, (lower.toLowerCase()).toCharArray()[0]);
		System.out.println(sb.toString());

	}

} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		int N = 0;
		int K = 0;
		String S;
		Scanner sc = new Scanner(System.in);
		N = Integer.parseInt(sc.next());
		K = Integer.parseInt(sc.next());
		S = sc.next();
		StringBuilder sb = new StringBuilder();
		sb.append(S);
		char s;
		String lower;
		s = sb.charAt(K-1);
		lower=String.valueOf(s);
		sb.setCharAt(K-1, (lower.toLowerCase()).toCharArray()[0]);
		System.out.println(sb.toString());

	} main {
		// TODO 自動生成されたメソッド・スタブ
		int N = 0;
		int K = 0;
		String S;
		Scanner sc = new Scanner(System.in);
		N = Integer.parseInt(sc.next());
		K = Integer.parseInt(sc.next());
		S = sc.next();
		StringBuilder sb = new StringBuilder();
		sb.append(S);
		char s;
		String lower;
		s = sb.charAt(K-1);
		lower=String.valueOf(s);
		sb.setCharAt(K-1, (lower.toLowerCase()).toCharArray()[0]);
		System.out.println(sb.toString());

	} int N = 0; N 0 int K = 0; K 0 String S; S Scanner sc = new Scanner(System.in); sc new Scanner(System.in) N = Integer.parseInt(sc.next()) N Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc K = Integer.parseInt(sc.next()) K Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc S = sc.next() S sc.next() sc.next sc StringBuilder sb = new StringBuilder(); sb new StringBuilder() sb.append(S) sb.append sb S char s; s String lower; lower s = sb.charAt(K-1) s sb.charAt(K-1) sb.charAt sb K-1 K 1 lower=String.valueOf(s) lower String.valueOf(s) String.valueOf String s sb.setCharAt(K-1, (lower.toLowerCase()).toCharArray()[0]) sb.setCharAt sb K-1 K 1 (lower.toLowerCase()).toCharArray()[0] (lower.toLowerCase()).toCharArray() (lower.toLowerCase()).toCharArray (lower.toLowerCase()) lower.toLowerCase lower 0 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) {
		// TODO 自動生成されたメソッド・スタブ
		int N = 0;
		int K = 0;
		String S;
		Scanner sc = new Scanner(System.in);
		N = Integer.parseInt(sc.next());
		K = Integer.parseInt(sc.next());
		S = sc.next();
		StringBuilder sb = new StringBuilder();
		sb.append(S);
		char s;
		String lower;
		s = sb.charAt(K-1);
		lower=String.valueOf(s);
		sb.setCharAt(K-1, (lower.toLowerCase()).toCharArray()[0]);
		System.out.println(sb.toString());

	}

} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		int N = 0;
		int K = 0;
		String S;
		Scanner sc = new Scanner(System.in);
		N = Integer.parseInt(sc.next());
		K = Integer.parseInt(sc.next());
		S = sc.next();
		StringBuilder sb = new StringBuilder();
		sb.append(S);
		char s;
		String lower;
		s = sb.charAt(K-1);
		lower=String.valueOf(s);
		sb.setCharAt(K-1, (lower.toLowerCase()).toCharArray()[0]);
		System.out.println(sb.toString());

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		int N = 0;
		int K = 0;
		String S;
		Scanner sc = new Scanner(System.in);
		N = Integer.parseInt(sc.next());
		K = Integer.parseInt(sc.next());
		S = sc.next();
		StringBuilder sb = new StringBuilder();
		sb.append(S);
		char s;
		String lower;
		s = sb.charAt(K-1);
		lower=String.valueOf(s);
		sb.setCharAt(K-1, (lower.toLowerCase()).toCharArray()[0]);
		System.out.println(sb.toString());

	}

}