1484: LYS 的小小游戏

Memory Limit:128 MB Time Limit:3.000 S
Judge Style:Text Compare Creator:
Submit:42 Solved:27

Description

Input

Output

Sample Input Copy

7
1 -1 -1 1

Sample Output Copy

1 2 3 4 5 6 7
24 25 40 39 38 37 8
23 26 41 48 47 36 9
22 27 42 49 46 35 10
21 28 43 44 45 34 11
20 29 30 31 32 33 12
19 18 17 16 15 14 13

HINT