/**
 *    File Name:      A.cpp
 *    Author:         BlockChanZJ
 *    Created Time:   2020年02月09日 星期日 13时45分17秒
**/

#include<bits/stdc++.h>
using namespace std;

#undef _GLIBCXX_DEBUG

template <typename A, typename B>
string to_string(pair<A, B> p);

template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p);

template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p);

string to_string(const string& s) {
	return '"' + s + '"';
}

string to_string(const char* s) {
	return to_string((string) s);
}

string to_string(bool b) {
	return (b ? "true": "false");
}

string to_string(vector<bool> v) {
	bool first = true;
	string res = "{";
	for (int i = 0; i < static_cast<int>(v.size()); i++) {
		if (!first) {
			res += ", ";
		}
		first = false;
		res += to_string(v[i]);
	}
	res += "}";
	return res;
}

template <size_t N>
string to_string(bitset<N> v) {
	string res = "";
	for (size_t i = 0; i < N; i++) {
		res += static_cast<char>('0' + v[i]);
	}
	return res;
}

template <typename A>
string to_string(A v) {
	bool first = true;
	string res = "{";
	for (const auto &x : v) {
		if (!first) {
			res += ", ";
		}
		first = false;
		res += to_string(x);
	}
	res += "}";
	return res;
}

template <typename A, typename B>
string to_string(pair<A, B> p) {
	return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}

template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p) {
	return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ")";
}

template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p) {
	return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ", " + to_string(get<3>(p)) + ")";
}

void debug_out() { cerr << "\033[33;0m" << endl; }

template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
	cerr << " " << to_string(H);
	debug_out(T...);
}

template <typename T>
void debug_out (T a[], int n) {
	cerr << "{" << to_string(a[0]);
	for (int i = 1; i < n; ++i) cerr << ", " << to_string(a[i]);
	cerr << "}";
	debug_out();
}

#define LOCAL

#ifdef LOCAL
#define dbg(...)  cerr << "\033[33;1m" << "[" << #__VA_ARGS__ << "] : ", debug_out(__VA_ARGS__)
#else
#define dbg(...) 42
#endif

using LL = long long;
using PII = pair<int,int>;

mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());

#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define SZ(x) ((int)(x.size()))
#define sqr(x) ((x)*(x))

LL powmod (LL a, LL b, LL MOD) {
	LL ans = 1;
	while (b) {
		if (b & 1) ans = ans * a % MOD;
		b >>= 1;
		a = a * a % MOD;
	}
	return ans % MOD;
}

const int N = 100005, MOD = 1e9+7, INF = 1e9;

// head

void init () {
	int n, k; cin >> n >> k;
	string s; cin >> s;
	s[k-1] = tolower(s[k-1]);
	cout << s << endl;
}

void work () {
}

int main () {
        time_t tic = clock();
        int T = 1;
        //scanf ("%d",&T);
        while (T--) {
                init (); 
                work (); 
        }
        time_t toc = clock();
        cerr << "execute time = " << (toc-tic) / CLOCKS_PER_SEC << "ms\n"; 
        return 0;
}

Measured memory_bytes: 256