Description
A Sunday afternoon,star found a very interestring mathematicproblem in a book.Hewas so excited and quickly got the answers of the front simplesituations.Little by little,it becamemore and more difficult to do.Then star though he needs some help.Willyou the intelligentprogrammer help him to calculate this problem?
The topic is like this:suppose thereare 3*n+2 balls interconnect like the chart shows,nartual numbers 1 to 3*n+2 is these ball's serialnumber.Like the chart,the connected ball'sdifference of serial number absolute value is the sequence1,2,3......3n+1.
Input
The input contains many kinds ofcases,each case one line,contains a natural number n(n<1000).
Output
Each input case,outputs three lines,the nartual number separates with the blank space,between each kind of case separates with the white line.
2 6
1 8 4 5
3 7
2 9 5
1 11 4 5 7
3 10 6
2 12 5 9
1 14 4 11 7 8
3 13 6 10
Simple Input
2
3
4
Simple Output
0 2 6 0
1 8 4 5
0 3 7 0
0 2 9 5 0
1 11 4 8 7
0 3 10 6 0
0 2 12 5 9 0
1 14 4 11 7 8
0 3 13 6 10 0