#include <bits/stdc++.h>

using namespace std;

int main(){
	short b;cin>>b;
	
	short k;cin>>k;
	
	string a;cin>>a;
	if(a.at(k-1) == 'A'){
		a.at(k-1) = 'a';
	}
	if(a.at(k-1) == 'B'){
		a.at(k-1) = 'b';
	}
	if(a.at(k-1) == 'C'){
		a.at(k-1) = 'c';
	}
	
	cout<<a;
	return 0;
}