There is a matrix $M$ that has $n$ rows and $m$ columns $(1 \leq n \leq 1000 ,1 \leq m \leq 1000 )$.Then we perform $q (1 \leq q \leq 100,000)$ operations:
1 x y: Swap row x and row y $(1 \leq x,y \leq n)$;
2 x y: Swap column x and column y $(1 \leq x,y \leq m)$;
3 x y: Add y to all elements in row x $(1 \leq x \leq n,1 \leq y \leq 10,000)$;
4 x y: Add y to all elements in column x $(1 \leq x \leq m,1 \leq y \leq 10,000)$;
Input
There are multiple test cases. The first line of input contains an integer $T (1\leq T\leq 20)$ indicating the number of test cases. For each test case:
The first line contains three integers $n$, $m$ and $q$.
The following $n$ lines describe the matrix M.$(1 \leq M_{i,j} \leq 10,000)$ for all $(1 \leq i \leq n,1 \leq j \leq m)$.
The following $q$ lines contains three integers $a(1 \leq a \leq 4)$, $x$ and $y$.
Output
For each test case, output the matrix $M$ after all $q$ operations.