You are given a n*m size matrix A. The matrix has n rows and m columns. The element at the i-th row and j-th column is Ai,j. Consider two sub-matrices in it, these two sub-matrices are defined by (i) the coordinates of the top left elements of these two sub-matrices are (x1, y1) and (x2, y2), respectively, and (ii) the size of each sub-matrix is l1*l2. The matrix swapping operation is swapping every elements pair in these two sub-matrices. For example, for all i (0 ≤ i < l1) and j (0 ≤ j < l2), swap Ax1+i,y1+j and Ax2+i,y2+j.
We guarantee these two swapping sub-matrices are not adjacent or overlapping.
What the result matrix is after applied q times matrix swapping operations?