You are given a string S of length N consisting of A, B and C, and an integer K which is…
- User
You are given a string S of length N consisting of
A,BandC, 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,BandC. 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.
Examples
Input
3 1 ABC
Output
aBC
Input
4 3 CABA
Output
CAbA
Assistant
python# Read input n, k = map(int, input().split()) s = input().strip() # Convert string to list to modify characters s_list = list(s) # Lowercase the K-th character (1-based index) s_list[k-1] = s_list[k-1].lower() # Join and print print(''.join(s_list))
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.