has an array consisting of integers: . The initial value of is . There are operations, including four types as follows.
Type : 1 sort the array.
Type : 2 sort the array and reverse it.
Type : 3 x y swap . It is guaranteed that is not equal to , and .
Type : 4 reverse the array.
You need to output the array after operations.
First line with two intergers .
Next lines are the operations.
One line, numbers, the array.
小 Z 有一个下标从 开始并且长度为 的序列,初始时下标为 位置的数字为 。有 个操作,每个操作会是以下四种之一。