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 Rust (1.15.1) (judge verdict: Accepted)

fn main() {
  let (_n, k) = {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).unwrap();
    let mut ws = s.split_whitespace();
    let n: usize = ws.next().unwrap().parse().unwrap();
    let k: usize = ws.next().unwrap().parse().unwrap();
    (n, k)
  };

  let s = {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).unwrap();
    s.trim_right().to_owned()
  };

  for (i, c) in s.chars().enumerate() {
    if i + 1 == k {
      let d = c as i64 + ('a' as i64 - 'A' as i64);
      print!{"{}", d as u8 as char};
    } else {
      print!{"{}", c};
    }
  }
}