import java.util.Scanner;

public class Main {
	public static void main(String[] args) {		
		try (Scanner sc = new Scanner(System.in)){
			int n = sc.nextInt();
			int k = sc.nextInt();
			String s = sc.next();
			String array[] = new String[n];
			
			int i = 0;
			while(i < n) {
				array[i] = s.substring(i,i+1);
				i ++;
			}
			
			switch (array[k-1]) {
				case "A":
					array[k-1] = "a";
					break;
				case "B":
					array[k-1] = "b";
					break;
				case "C":
					array[k-1] = "c";
					break;
			}
			
			StringBuilder result = new StringBuilder();
			int j = 0;
			while (j < n) {
				result.append(array[j]);
				j ++;
			}
			System.out.println(result);
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {		
		try (Scanner sc = new Scanner(System.in)){
			int n = sc.nextInt();
			int k = sc.nextInt();
			String s = sc.next();
			String array[] = new String[n];
			
			int i = 0;
			while(i < n) {
				array[i] = s.substring(i,i+1);
				i ++;
			}
			
			switch (array[k-1]) {
				case "A":
					array[k-1] = "a";
					break;
				case "B":
					array[k-1] = "b";
					break;
				case "C":
					array[k-1] = "c";
					break;
			}
			
			StringBuilder result = new StringBuilder();
			int j = 0;
			while (j < n) {
				result.append(array[j]);
				j ++;
			}
			System.out.println(result);
		}
	}
} Main public static void main(String[] args) {		
		try (Scanner sc = new Scanner(System.in)){
			int n = sc.nextInt();
			int k = sc.nextInt();
			String s = sc.next();
			String array[] = new String[n];
			
			int i = 0;
			while(i < n) {
				array[i] = s.substring(i,i+1);
				i ++;
			}
			
			switch (array[k-1]) {
				case "A":
					array[k-1] = "a";
					break;
				case "B":
					array[k-1] = "b";
					break;
				case "C":
					array[k-1] = "c";
					break;
			}
			
			StringBuilder result = new StringBuilder();
			int j = 0;
			while (j < n) {
				result.append(array[j]);
				j ++;
			}
			System.out.println(result);
		}
	} main {		
		try (Scanner sc = new Scanner(System.in)){
			int n = sc.nextInt();
			int k = sc.nextInt();
			String s = sc.next();
			String array[] = new String[n];
			
			int i = 0;
			while(i < n) {
				array[i] = s.substring(i,i+1);
				i ++;
			}
			
			switch (array[k-1]) {
				case "A":
					array[k-1] = "a";
					break;
				case "B":
					array[k-1] = "b";
					break;
				case "C":
					array[k-1] = "c";
					break;
			}
			
			StringBuilder result = new StringBuilder();
			int j = 0;
			while (j < n) {
				result.append(array[j]);
				j ++;
			}
			System.out.println(result);
		}
	} try (Scanner sc = new Scanner(System.in)){
			int n = sc.nextInt();
			int k = sc.nextInt();
			String s = sc.next();
			String array[] = new String[n];
			
			int i = 0;
			while(i < n) {
				array[i] = s.substring(i,i+1);
				i ++;
			}
			
			switch (array[k-1]) {
				case "A":
					array[k-1] = "a";
					break;
				case "B":
					array[k-1] = "b";
					break;
				case "C":
					array[k-1] = "c";
					break;
			}
			
			StringBuilder result = new StringBuilder();
			int j = 0;
			while (j < n) {
				result.append(array[j]);
				j ++;
			}
			System.out.println(result);
		} {
			int n = sc.nextInt();
			int k = sc.nextInt();
			String s = sc.next();
			String array[] = new String[n];
			
			int i = 0;
			while(i < n) {
				array[i] = s.substring(i,i+1);
				i ++;
			}
			
			switch (array[k-1]) {
				case "A":
					array[k-1] = "a";
					break;
				case "B":
					array[k-1] = "b";
					break;
				case "C":
					array[k-1] = "c";
					break;
			}
			
			StringBuilder result = new StringBuilder();
			int j = 0;
			while (j < n) {
				result.append(array[j]);
				j ++;
			}
			System.out.println(result);
		} Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) 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 String array[] = new String[n]; array new String[n] n int i = 0; i 0 while(i < n) {
				array[i] = s.substring(i,i+1);
				i ++;
			} i < n i n {
				array[i] = s.substring(i,i+1);
				i ++;
			} array[i] = s.substring(i,i+1) array[i] array i s.substring(i,i+1) s.substring s i i+1 i 1 i ++ i switch (array[k-1]) {
				case "A":
					array[k-1] = "a";
					break;
				case "B":
					array[k-1] = "b";
					break;
				case "C":
					array[k-1] = "c";
					break;
			} array[k-1] array k-1 k 1 case "A": "A" case "A": array[k-1] = "a" array[k-1] array k-1 k 1 "a" break; case "B": "B" case "B": array[k-1] = "b" array[k-1] array k-1 k 1 "b" break; case "C": "C" case "C": array[k-1] = "c" array[k-1] array k-1 k 1 "c" break; StringBuilder result = new StringBuilder(); result new StringBuilder() int j = 0; j 0 while (j < n) {
				result.append(array[j]);
				j ++;
			} j < n j n {
				result.append(array[j]);
				j ++;
			} result.append(array[j]) result.append result array[j] array j j ++ j System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {
	public static void main(String[] args) {		
		try (Scanner sc = new Scanner(System.in)){
			int n = sc.nextInt();
			int k = sc.nextInt();
			String s = sc.next();
			String array[] = new String[n];
			
			int i = 0;
			while(i < n) {
				array[i] = s.substring(i,i+1);
				i ++;
			}
			
			switch (array[k-1]) {
				case "A":
					array[k-1] = "a";
					break;
				case "B":
					array[k-1] = "b";
					break;
				case "C":
					array[k-1] = "c";
					break;
			}
			
			StringBuilder result = new StringBuilder();
			int j = 0;
			while (j < n) {
				result.append(array[j]);
				j ++;
			}
			System.out.println(result);
		}
	}
} public class Main {
	public static void main(String[] args) {		
		try (Scanner sc = new Scanner(System.in)){
			int n = sc.nextInt();
			int k = sc.nextInt();
			String s = sc.next();
			String array[] = new String[n];
			
			int i = 0;
			while(i < n) {
				array[i] = s.substring(i,i+1);
				i ++;
			}
			
			switch (array[k-1]) {
				case "A":
					array[k-1] = "a";
					break;
				case "B":
					array[k-1] = "b";
					break;
				case "C":
					array[k-1] = "c";
					break;
			}
			
			StringBuilder result = new StringBuilder();
			int j = 0;
			while (j < n) {
				result.append(array[j]);
				j ++;
			}
			System.out.println(result);
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {		
		try (Scanner sc = new Scanner(System.in)){
			int n = sc.nextInt();
			int k = sc.nextInt();
			String s = sc.next();
			String array[] = new String[n];
			
			int i = 0;
			while(i < n) {
				array[i] = s.substring(i,i+1);
				i ++;
			}
			
			switch (array[k-1]) {
				case "A":
					array[k-1] = "a";
					break;
				case "B":
					array[k-1] = "b";
					break;
				case "C":
					array[k-1] = "c";
					break;
			}
			
			StringBuilder result = new StringBuilder();
			int j = 0;
			while (j < n) {
				result.append(array[j]);
				j ++;
			}
			System.out.println(result);
		}
	}
}
