There is a knight on an $n \times n$ chessboard. For each square, print the minimum number of moves the knight needs to do to reach the top-left corner.
The only line has an integer $n$ .
Print the number of moves for each square.
8
\n
0 3 2 3 2 3 4 5 3 4 1 2 3 4 3 4 2 1 4 3 2 3 4 5 3 2 3 2 3 4 3 4 2 3 2 3 4 3 4 5 3 4 3 4 3 4 5 4 4 3 4 3 4 5 4 5 5 4 5 4 5 4 5 6
· · · · · · · \n · · · · · · · \n · · · · · · · \n · · · · · · · \n · · · · · · · \n · · · · · · · \n · · · · · · · \n · · · · · · · \n