Consider an array that initially contains numbers. The elements of the array are numbered from left to right, starting from . The following operations can be performed on this array:
I — Insert the number after the element at position . All numbers at positions greater than are shifted one position to the right, and the length of the array increases by . Positions in the array are numbered starting from . I 0 x means inserting an element at the very beginning of the array, I 1 x means inserting after the first element, and so on.
D — Delete the element at position . All numbers at positions greater than are shifted one position to the left, and the length of the array decreases by .
S i_1 i_2 — Swap the array segments [i_1,\ldots,i_1 + \text{len}] and [i_2,\ldots,i_2 + \text{len}]. As a result, for each k = 0, 1, \ldots, \text{len}, swap A_{i_1 + k} and A_{i_2 + k}. It is guaranteed that the segments [i_1,i_1 + \text{len}] and [i_2,i_2 + \text{len}] do not overlap.
A — Output the number currently at position .
You are to perform all described operations in the given order.
The first line contains two integers and (1 \le n,\ m \le 100\ 000), where is the number of queries. The second line contains integers: the initial elements of the array before any operations. The next lines describe the operations to perform. Each operation is specified by its type followed by its parameters, separated by spaces. It is guaranteed that during the operations, the array is never empty. All indices used in operations are from to the current array size, except for the operation I 0 x, which corresponds to insertion at the beginning. All input numbers are between and 10^9 inclusive.
For each A query, output the answer to that query on a separate line. In addition, after all operations output the resulting array.
Example 1