游客 Signup | Login
中文 | En

3918 - the snake

通过次数

0

提交次数

0

Time Limit : 1 秒 Memory Limit : 128 MB

在n*n方陈里填入1,2,...,n*n,要求填成蛇形。例如n=4时方陈为:

10 11 12 1
9 16 13 2
8 15 14 3
7 6 5 4

Input

直接输入方陈的维数,即n的值。(n<=100)

Output

输出结果是蛇形方陈。

Examples

Input Format

3

Output Format

7 8 1
6 9 2
5 4 3