World famous scientist Innokentiy has started studying сomputability theory and invented a new abstract executor that represents a tape of n cells, each of which contains a lowercase Latin letter. Two heads can move along the tape, each pointing at some cell. This device can execute the following instructions: to move the specified head to the left or to the right by one cell, to reverse the part of the tape between two heads, including the cells the heads point at, and to answer the request which symbol the specified head points at. Innokentiy asked you to help him to emulate the work of this device since the program he has written works too slow.
The first line contains three integers separated by spaces: n, l and r (1 ≤ n ≤ 105, 1 ≤ l < r ≤ n) — the number of cells in the tape and the initial positions of the left and the right head, correspondingly.
The second line contains n lowercase Latin letters, written in the cells.
The third line contains a single integer m (1 ≤ m ≤ 3·105) — the number of queries.
In the next m lines there are the queries in the following form.
It is guaranteed that the left head always remains to the left of the right head and that the heads don't move out of the tape.
Output one string, containing all the answers for the queries of the last type. The k-th character of this string must be the answer to the k-th query of the type «Q X».
11 2 6
abracadabra
12
Q L
Q R
R
Q L
Q R
S L R
S R R
Q L
Q R
R
Q L
Q R
baabcddc
| Name |
|---|


