#include <iostream>
#include <vector>
#include <cctype>

using namespace std;
vector <char> s;
int n, k;
char c;

int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(NULL);
    cin >> n >> k;
    for(int i = 0; i < n; ++i){
        cin >> c;
        s.push_back(c);
    }
    s[k-1] = tolower(s[k-1]);
    for(int i = 0; i < n; ++i) cout << s[i];
    return 0;
}