You are given a matrix A of size N*N where A[i][j] denotes the element in the ith row and jth column.
You will be given two types of queries as follows:
Type 1:
1 x y k : Change the value of a[x][y] to k
Type 2:
2 x1 y1 x2 y2 - Output the XOR sum of all the elements in the rectangle (submatrix) whose top left corner is a[x1][y1] and bottom right corner is a[x2][y2]. (both inclusive)
Input Format
The first line contains two integers N and Q
The next N lines contain N integers, each denoting the matrix i.e. the jth integer on the ith line denotes a[i][j]
The next Q lines contain the queries as described above.
Constraints
1<=N<=1000
1<=Q<=100000
0<=A[i][j]<=232-1
0<=k<=232-1
1<=x,y,x1,y1,x2,y2<=n
x1<=x2
y1<=y2
Output Format
A single integer for each of the queries of type 2 on a new line