Input contains several test cases.
For each case:
The fisrt line contains $N$, $M$. $N$ is mentioned aboved ans $M$ is the number of the sum of game rounds and the times of Bob's swapping.
The second line contains N integars $a_1, a_2, ... a_n$, indicating the number of each piles' stones.
The next M lines will have an integar $opt$ $(1 \leq opt \leq 2)$, indicating the type of operation.
If opt equals $1$, then $L$ and $R$ follow. Alice and Bob start a new round and Alice choose $L$ and $R$ as mentioned.
If opt equals $2$, then $POS$ follows. Bob will swap the piles labelled $POS$ and $POS + 1$.
$0 \leq a_i \leq 1,000,000$
$1 \leq N, M \leq 100,000, \sum{N}, \sum{M} < 600,000$
$1 \leq L \leq R \leq N$
$1 \leq POS < N$