Problem a: 蛇形方阵

Problem a: 蛇形方阵

Time Limit: 1 Sec  Memory Limit: 256 MB
Submit: 148  Solved: 42
[Submit] [Status] [Web Board] [Creator:]

Description

输入一个正整数 n,生成一个 n×n 的蛇形方阵(具体见样例)。

Input

一行一个正整数 n,1≤n≤20。

Output

共 n 行,每行 n 个正整数,每个正整数占 5 列。

Sample Input Copy

5

Sample Output Copy

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