QOJ.ac

QOJ

Limite de temps : 2 s Limite de mémoire : 1024 MB Points totaux : 100

#23873. Inversion of a String

Statistiques

You are given a string $S$ of length $N$.

What string is formed if we reverse the order of the characters from the $A$-th character to the $B$-th character of $S$, while leaving the other characters unchanged? Here, the first character of $S$ is the $1$-st character, and the last character is the $N$-th character.

Given the string $S$ and $2$ integers $A, B$, write a program to output the string formed by reversing the order of the characters from the $A$-th character to the $B$-th character of $S$.

Input

The input is given from Standard Input in the following format:

$$ \begin{aligned} &N \ A \ B \\ &S \end{aligned} $$

Output

Output on $1$ line the string formed by reversing the order of the characters from the $A$-th character to the $B$-th character of $S$.

Constraints

  • $1 \le A \le B \le N \le 200$.
  • $S$ is a string of length $N$.
  • Each character of $S$ is an uppercase or lowercase English letter.

Examples

Input 1

10 3 7
JOIjoiJoIj

Output 1

JOJiojIoIj

Input 2

9 6 6
abcdefghi

Output 2

abcdefghi

Note 2

  • It is possible that $A = B$.

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.