Time limit
2s
Memory limit
128 MB
A magic square is an arrangement of the integers from 1 through N^2 in an N by N grid, using each integer exactly once, such that every row, every column, and the two main diagonals all have the same sum.
Given N, print any N by N magic square.
The first line contains a natural number N. (3 <= N <= 300)
Print any N by N magic square that satisfies the condition. Print N integers on each line, separated by spaces.