P24256 [AtCoder] A Reverse
入门
题目描述

Problem Statement

You are given integers L, R, and a string S consisting of lowercase English letters.
Print this string after reversing (the order of) the L-th through R-th characters.

Input

Input is given from Standard Input in the following format:
L R
S

Output

Print the specified string.

Constraints

  • S consists of lowercase English letters.
  • $1 \le |S| \le 10^5 (|S|$ is the length of S.)
  • L and R are integers.
  • $1 \le L \le R \le |S|$

Sample Input 1

3 7
abcdefgh

Sample Output 1

abgfedch

After reversing the 3-rd through 7-th characters of abcdefgh, we have abgfedch.

Sample Input 2

1 7
reviver

Sample Output 2

reviver

The operation may result in the same string as the original.

Sample Input 3

4 13
merrychristmas

Sample Output 3

meramtsirhcyrs

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
3 7 abcdefgh
样例输出
abgfedch