Problem
Despite the great fame of the commander and dictator, who played a large role in the political and military history of Ancient Rome, Caesar was still a writer and writer. His writings are characterized by simplicity and clarity of writing style, therefore they are considered classics of ancient Roman literature and are used to teach the Latin language.
In the meantime, we'll play with the lines.
Given a string S
, in which a substring consisting of characters from i
th to j
th inclusive (characters of the string S
are numbered from one) and swapped the i
th character with the j
th, (i+1) code> with (j-1)
and so on (substring converted). Output the string S
after the changes.
Input
The first line contains the string
S
, no longer than 1000 characters, the second – numbers
i
and
j
(< span class="math-tex">\(i <= j\)).
Imprint
Print the answer to the problem.
Examples
# |
Input |
Output |
1 |
vjhoamkts
78 |
vjhoamtks |