6304: 蜿蜒

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:22 Solved:16

Description

一片山岭蜿蜒盘旋,编号为1n*n。这些山在一个n*n的区域内,以左上角为起点,按样例所示方式盘旋。

Input

一行一个正整数n。

Output

n行,每行n个数。

Sample Input Copy

5

Sample Output Copy

1 2 3 4 5
16 17 18 19 6
15 24 25 20 7
14 23 22 21 8
13 12 11 10 9

HINT

对于40%的数据,n<=10

对于100%的数据,n<=100