you give array length 2n you process q query each query follow 4 type Replacex k change a_x k Reversek reverse subarray i1 cdot 2k1 cdot 2k ge 1 Swapk swap subarray 2i2 cdot 2k1 2i1 cdot 2k 2i1 cdot 2k1 2i cdot 2k ge 1 Suml r print sum element subarray l r Write program quickly process give query