Problem:
Score : 100 points

Problem Statement

You are given a string S of length N consisting of A, B and C, and an integer K which is between 1 and N (inclusive).
Print the string S after lowercasing the K-th character in it.

Constraints

1 ≤ N ≤ 50

1 ≤ K ≤ N

S is a string of length N consisting of A, B and C.

Input

Input is given from Standard Input in the following format:

N K
S

Output

Print the string S after lowercasing the K-th character in it.

Sample Input 1

3 1
ABC

Sample Output 1

aBC

Sample Input 2

4 3
CABA

Sample Output 2

CAbA

Solution in C++14 (GCC 5.4.1) (judge verdict: Runtime Error)

#include <bits/stdc++.h>
#define rep(i, n) for(int i=0; i<(n); ++i)
#define all(v)    (v).begin(), (v).end()
#define in        ([]{int n; cin>>n; return n;}())
using namespace std;
using lint = int64_t;

int main() { cin.tie(0); ios::sync_with_stdio(false);
    int N = in;

    vector<vector<pair<int,bool>>>  to(N);
    rep( i, N-1 ) {
        int u=in-1, v=in-1; bool w=in%2;
        to[u].push_back( make_pair(v,w) );
        to[v].push_back( make_pair(u,w) );
    }

    vector<int> ans(N, -1); ans[0] = 0;
    queue <int> q;          q.push(0);
    while( !q.empty() ) {
        int u = q.front(); q.pop();
        for( pair<int,bool> p : to[u] ) {
            int v = p.first;
            if( ans[v] != -1 ) continue;
            ans[v] = ans[u] != p.second;
            q.push(v);
        }
    }

    rep( i, N ) cout << ans[i] << '\n';
}