408410: GYM103115 D cocktail with swap

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

D. cocktail with swaptime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

Mr. Cocktail get a string contain N characters. The character in the string from left to right respective marked as $$$a_1, a_2 ... a_n$$$. This string consists of lowercase letters only.

Cocktail can perform unlimited times exchange operations on this string. Each operation can choose two digits $$$i,j$$$, satisfying $$$l \leq |i-j| \leq r$$$, and exchange the letters in these two positions—-That is, $$$a_i, a_j$$$.

Cocktail hopes that the lexicographical order of this string after several exchanges is the smallest. Now given this string and $$$l, r$$$, please output a string representing the smallest lexicographical order that Cocktail can achieve after several operations.

Input

In the first line, input three integer, indicating $$$n, l, r(2 \leq n \leq 10^5, 1 \leq l \leq r < n)$$$, the meaning is shown in the statement.

The next line input a string $$$a$$$ of length $$$n$$$.Represents the initial string.

Output

Output a string representing the smallest lexicographical string reached after several operations with follow the rules as statement describe.

ExamplesInput
5 1 1
edcba
Output
abcde
Input
5 4 4
edcba
Output
adcbe

加入题单

算法标签: