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