#t169. 修改字符数组

修改字符数组

Modify a Character Array

Problem Description

Read in nn consecutive characters, change the kk-th character to a specified other character, and output the modified result.

Input Format

The first line contains a positive integer nn (0<n≤300\lt n \le 30).

The second line contains a string of nn consecutive characters.

The third line contains an integer kk and a character cc, meaning that the kk-th character should be changed to cc.

Output Format

Output the modified string.

Sample Input 1

15
congratulations
2 a

Sample Output 1

cangratulations

Sample Input 2

11
hello world
8 a

Sample Output 2

hello warld

Hint

The input string may contain whitespace, so you cannot read it directly with %s — use a line-reading function (e.g. gets/fgets/std::getline) instead.