Given an integer n which is a multiple of 4. Find an n x n grid for which the bitwise xor of every row and every column is the same. Each number from 0 to n^2
- 1 must appear in the grid exactly once.
One integer n (1 ≤ n ≤ 1000) which is a multiple of 4.
Print an n x n grid with numbers from 0 to n^2
- 1 for which the bitwise xor of every row and column is the same. If there are multiple solutions, print any.