write a go solution for E. Xor-Grid Problemtime limit per test5 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputGiven a matrix a of size nxm, each cell of which contains a non-negative integer. The integer lying at the intersection of the i-th row and the j-th column of the matrix is called a_i,j.Let's define f(i) and g(j) as the XOR of all integers in the i-th row and the j-th column, respectively. In one operation, you can either: Select any row i, then assign a_i,j:=g(j) for each 1<=j<=m; or Select any column j, then assign a_i,j:=f(i) for each 1<=i<=n. An example of applying an operation on column 2 of the matrix. In this example, as we apply an operation on column 2, all elements in this column are changed: a_1,2:=f(1)=a_1,1oplusa_1,2oplusa_1,3oplusa_1,4=1oplus1oplus1oplus1=0 a_2,2:=f(2)=a_2,1oplusa_2,2oplusa_2,3oplusa_2,4=2oplus3oplus5oplus7=3 a_3,2:=f(3)=a_3,1oplusa_3,2oplusa_3,3oplusa_3,4=2oplus0oplus3oplus0=1 a_4,2:=f(4)=a_4,1oplusa_4,2oplusa_4,3oplusa_4,4=10oplus11oplus12oplus16=29 You can apply the operations any number of times. Then, we calculate the textitbeauty of the final matrix by summing the absolute differences between all pairs of its adjacent cells.More formally, textitbeauty(a)=sum|a_x,y-a_r,c| for all cells (x,y) and (r,c) if they are adjacent. Two cells are considered adjacent if they share a side.Find the minimum textitbeauty among all obtainable matrices.InputThe first line contains a single integer t (1<=t<=250) — the number of test cases.The first line of each test case contains two integers n and m (1<=n,m<=15) — the number of rows and columns of a, respectively.The next n lines, each containing m integers a_i,1,a_i,2,ldots,a_i,m (0<=a_i,j<2^20) — description of the matrix a.It is guaranteed that the sum of (n^2+m^2) over all test cases does not exceed 500.OutputFor each test case, print a single integer b — the smallest possible textitbeauty of the matrix.ExampleInput41 21 32 30 1 05 4 42 30 2 44 5 13 31 2 34 5 67 8 9Output1 3 13 24 NoteLet's denote r(i) as the first type operation applied on the i-th row, and c(j) as the second type operation applied on the j-th column.In the first test case, you can apply an operation c(1), which assigns a_1,1:=1oplus3=2. Then, we'll receive this matrix: 23 In the second test case, you can apply an operation r(1), which assigns: a_1,1:=g(1)=0oplus5=5 a_1,2:=g(2)=1oplus4=5 a_1,3:=g(3)=0oplus4=4 The resulting matrix after performing the operation is: 554544 In the third test case, the best way to achieve minimum textitbeauty is applying three operations: c(3), r(2), and c(2). The resulting matrix is: 046456. Output only the code with no comments, explanation, or additional text.