Even paratroopers have vacations. The flight to Sirius in the depths of “The Admiral Brisco” Leo Hao whiled away with chessboard. No, he did not like usual chess game, and in addition, he did not have likely rival. The whole day Leo amused himself with an interesting thing: he tried to travel over all cells of the chessboard with the knight so that the knight visited each cell only one time. Leo attempted one time, then second, but always something was wrong. Leo became a little angry. Then he attempted board 4*4 instead of 8*8. Again failure after failure. A little angry, with the chessboard under his arm, Leo went to look for a local programmer. They two together indeed will solve this problem.
The only line contains an integer N (1 ≤ N ≤ 8).
If it is possible to travel with the knight over the square field N×N cells, then output should contain N2 lines with tour over the chessboard with mentioned property, otherwise the only word “IMPOSSIBLE”.
If you have solved this problem, pay attention to the problem "Knight Mare"
Problem Author: Folklore. Prepared by Den Raskovalov
Problem Source: IX Open Collegiate Programming Contest of the High School Pupils (13.03.2004)