Problem D: 数字方阵-填充数字4

Problem D: 数字方阵-填充数字4

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 16  Solved: 14
[Status] [Submit] [Creator:]

Description

模仿样例,输入n输出一个n*n的数字方阵,用连续的数字1-9填满。
    1.一行填完后,下一行接着上一行末尾的数字继续填。
    2.数字9填完后,接着从数字1开始填。


Input

一个正整数n (1<=n<=100)

Output

输出n行每行中数字之间一个空格分隔

Sample Input Copy

5

Sample Output Copy

1 2 3 4 5 
6 7 8 9 1 
2 3 4 5 6 
7 8 9 1 2 
3 4 5 6 7