#include<iostream>
#include<string>
#include<vector>
#include<utility>
#include<algorithm>
#include<map>
#include<cstdlib>
#include<cmath>
#include<numeric>
#include<iomanip>
#include<functional>
#include<cstdlib>
#include<queue>
#include<deque>
const double PI = acos(-1);
#define rep(i,n)for(int i=0;i<(n);i++)
using namespace std;
using ll =long long;
const int mod = 1000000007;
class mint {
	long long x;
public:
	mint(long long x = 0) : x((x% mod + mod) % mod) {}
	mint operator-() const {
		return mint(-x);
	}
	mint& operator+=(const mint & a) {
		if ((x += a.x) >= mod) x -= mod;
		return *this;
	}
	mint & operator-=(const mint & a) {
		if ((x += mod - a.x) >= mod) x -= mod;
		return *this;
	}
	mint & operator*=(const  mint & a) {
		(x *= a.x) %= mod;
		return *this;
	}
	mint operator+(const mint & a) const {
		mint res(*this);
		return res += a;
	}
	mint operator-(const mint & a) const {
		mint res(*this);
		return res -= a;
	}
	mint operator*(const mint & a) const {
		mint res(*this);
		return res *= a;
	}
	mint pow(ll t) const {
		if (!t) return 1;
		mint a = pow(t >> 1);
		a *= a;
		if (t & 1) a *= *this;
		return a;
	}
	// for prime mod
	mint inv() const {
		return pow(mod - 2);
	}
	mint& operator/=(const mint & a) {
		return (*this) *= a.inv();
	}
	mint operator/(const mint & a) const {
		mint res(*this);
		return res /= a;
	}

	friend ostream& operator<<(ostream & os, const mint & m) {
		os << m.x;
		return os;
	}
};
int ctoi(char c) {
	if (c >= '0' && c <= '9') {
		return c - '0';
	}
	return 0;
}

ll gcd(ll a, ll b) {
	if (a % b == 0) {
		return b;
	}
	else {
		return gcd(b, a % b);
	}
}
ll lcm(ll a, ll b) {
	return a * b / gcd(a, b);
};
//fixed << setprecision(2)
void func(vector<vector<int>>a, int x, int y, int h, int w, vector<vector<char>>c, int* ans) {

	if (x + 1 < w && a[y][x + 1] == 0 && c[y][x + 1] == 'g') {
		*ans = 1;
	}
	if (x > 0 && a[y][x - 1] == 0 && c[y][x - 1] == 'g') {
		*ans = 1;
	}
	if (y + 1 < h && a[y + 1][x] == 0 && c[y + 1][x] == 'g') {
		*ans = 1;
	}
	if (y > 0 && a[y - 1][x] == 0 && c[y - 1][x] == 'g') {
		*ans = 1;
	}




	if (x + 1 < w && a[y][x + 1] == 0 && c[y][x+1] == '.') {
		a[y][x + 1] = 1;
		func(a,x+1,y,h,w,c,ans);
	}
	if (x > 0 && a[y][x - 1] == 0 && c[y][x - 1] == '.') {
		a[y][x - 1] = 1;
		func(a, x - 1, y, h, w,c,ans);
	}
	if (y + 1 < h && a[y+1][x] == 0 && c[y+1][x] == '.') {
		a[y+1][x] = 1;
		func(a, x, y+1, h, w,c,ans);
	}
	if (y > 0 && a[y-1][x] == 0 && c[y-1][x] == '.') {
		a[y-1][x] = 1;
		func(a, x, y-1, h, w,c,ans);
	}

	
	a[x][y] = 2;
	if (x + 1 < w && a[y][x + 1] == 1 && c[y][x + 1] == '.') {
		a[y][x + 1] = 2;
		func(a, x + 1, y, h, w, c,ans);
	}
	if (x > 0 && a[y][x - 1] == 1 && c[y][x - 1] == '.') {
		a[y][x - 1] = 2;
		func(a, x - 1, y, h, w, c,ans);
	}
	if (y + 1 < h && a[y + 1][x] == 1 && c[y + 1][x] == '.') {
		a[y + 1][x] = 2;
		func(a, x, y + 1, h, w, c,ans);
	}
	if (y > 0 && a[y - 1][x] == 1 && c[y - 1][x] == '.') {
		a[y - 1][x] = 2;
		func(a, x, y - 1, h, w, c,ans);
	}
}
ll d(ll a) {
	ll ans = 1;
	a /= 10;
	while (a != 0) {
		ans++;
		a /= 10;
	}
	return ans;
}
bool f(ll tmp,ll a,ll b,ll x) {
	if (a * tmp + b * d(tmp)<=x) {
		return true;
	}
	else {
		return false;
	}
}
//小文字=大文字+32
int main() {
	int n, k;
	string s;
	cin >> n >> k >> s;
	s[k-1] += 32;
	cout << s;
	/*int h, w;
	cin >> h >> w;
	int v0x, v0y;
	int ans = 0;
	vector<vector<int>>a(h, vector<int>(w));

	vector<vector<char>>c(h, vector<char>(w));
	for (int i = 0; i < h; i++) {
		for (int j = 0; j < w; j++) {
			a[i][j] = 0;
			cin >> c[i][j];
			if (c[i][j] == 's') {
				v0y = i;
				v0x = j;
			}
		}
	}

	func(a, v0x, v0y, h, w, c, &ans);
	if (ans == 1) {
		cout << "yes";
	}
	else {
		cout << "no";
	}*/
}
	



Measured memory_bytes: 3604