You are given an array and need to handle two types of queries:
1 L R - Reverse the segment of the array.
2 L R - Determine the minimum value within the segment of the array.
The first line of the input contains two integers, and (1 \le n, m \le 10^5). The second line contains integers a_i (1 \le a_i \le 10^9), representing the initial array. The following lines each contain a query in the specified format. For the integers and , the constraint (1 \le L, R \le n) holds.
For each query of type 2, print the result on a new line.
Beispiel 1