{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cp align\u003d\"JUSTIFY\"\u003e \u003c/p\u003e\u003cp align\u003d\"JUSTIFY\"\u003e The well-known magician David Copperfield loves lo show the following trick: a square with N rows and N columns of different pictures appears on a TV screen, Let us number all the pictures in the following order:\u003cbr\u003e\u003cbr\u003e \u003c/p\u003e\u003ctable align\u003d\"center\"\u003e \u003ctbody\u003e\u003ctr align\u003d\"center\"\u003e\u003ctd width\u003d\"80\"\u003e1\u003c/td\u003e\u003ctd width\u003d\"80\"\u003e2\u003c/td\u003e\u003ctd width\u003d\"80\"\u003e...\u003c/td\u003e\u003ctd width\u003d\"80\"\u003eN\u003c/td\u003e\u003c/tr\u003e \u003ctr align\u003d\"center\"\u003e\u003ctd\u003e...\u003c/td\u003e\u003ctd\u003e...\u003c/td\u003e\u003ctd\u003e...\u003c/td\u003e\u003ctd\u003e...\u003c/td\u003e\u003c/tr\u003e \u003ctr align\u003d\"center\"\u003e\u003ctd\u003eN*(N-1)+1\u003c/td\u003e\u003ctd\u003eN*(N-1)+2\u003c/td\u003e\u003ctd\u003e...\u003c/td\u003e\u003ctd\u003eN*N\u003c/td\u003e\u003c/tr\u003e \u003c/tbody\u003e\u003c/table\u003e\u003cbr\u003e Each member of the audience is asked to put a finger on the upper left picture (i.e., picture number one) and The Magic begins: the magician tells the audience to move the finger K\u003csub\u003e1\u003c/sub\u003e times through the pictures (each move is a shift of the finger to the adjacent picture up, down, left or right provided that there is a picture to move to), then with a slight movement of his hand he removes some of the pictures with an exclamation \"You are not there!\", and ... it is true - your finger is not pointing to any of the pictures removed. Then again, he tells the audience to make K\u003csub\u003e2\u003c/sub\u003e moves, and so on. At the end he removes all the pictures but one and smiling triumphantly declares, \"I\u0027ve caught you\" (applause). \u003cbr\u003e\u003cbr\u003e Just now, David is trying to repeat this trick. Unfortunately, he had-a hard day before, and you know how hard to conjure with a headache. You have to write a program that will help David to make his trick. \u003cp\u003e\u003c/p\u003e \u003cp align\u003d\"JUSTIFY\"\u003e \u003cb\u003e\u003c/b\u003e\u003c/p\u003e\u003cp align\u003d\"JUSTIFY\"\u003eInput\u003c/p\u003e \u003cp align\u003d\"JUSTIFY\"\u003e The input file contains a single integer number N (1\u0026lt;N\u0026lt;101). \u003c/p\u003e \u003cp align\u003d\"JUSTIFY\"\u003e \u003cb\u003e\u003c/b\u003e\u003c/p\u003e\u003cp align\u003d\"JUSTIFY\"\u003eOutput\u003c/p\u003e \u003cp align\u003d\"JUSTIFY\"\u003e Your program should write the following lines with numbers to the output file:\u003cbr\u003e K\u003csub\u003e1\u003c/sub\u003e X\u003csub\u003e1,1\u003c/sub\u003e X\u003csub\u003e1,2\u003c/sub\u003e ... X\u003csub\u003e1,m1\u003c/sub\u003e\u003cbr\u003e K\u003csub\u003e2\u003c/sub\u003e X\u003csub\u003e2,1\u003c/sub\u003e X\u003csub\u003e2,2\u003c/sub\u003e ... X\u003csub\u003e2,m2\u003c/sub\u003e\u003cbr\u003e ...\u003cbr\u003e K\u003csub\u003ee\u003c/sub\u003e X\u003csub\u003ee,1\u003c/sub\u003e X\u003csub\u003ee,2\u003c/sub\u003e ... X\u003csub\u003ee,me\u003c/sub\u003e\u003cbr\u003e where K\u003csub\u003ei\u003c/sub\u003e is a number of moves the audience should make on the i-th turn (N\u0026lt;\u003dK\u003csub\u003ei\u003c/sub\u003e\u0026lt;300). All Ki, should be different (i.e. K\u003csub\u003ei\u003c/sub\u003e\u0026lt;\u0026gt;K\u003csub\u003ej\u003c/sub\u003e when i\u0026lt;\u0026gt;j). X\u003csub\u003ei,1\u003c/sub\u003e X\u003csub\u003ei,2\u003c/sub\u003e ... X\u003csub\u003ei,mi\u003c/sub\u003e are the numbers of the pictures David should remove after the audience will make K\u003csub\u003ei\u003c/sub\u003e moves (the number of the pictures removed is arbitrary, but each picture should be listed only once, and at least one picture should be removed on each turn).\u003cbr\u003e A description of the every next turn should begin with a new line. All numbers on each line should be separated by one or more spaces. After e iterations, all pictures except one should be removed. \u003c/p\u003e \u003cp align\u003d\"JUSTIFY\"\u003e \u003c/p\u003e\u003cp align\u003d\"JUSTIFY\"\u003eSample Input\u003c/p\u003e \u003cfont face\u003d\"Courier New\"\u003e \u003cpre\u003e3\n\u003c/pre\u003e \u003cp align\u003d\"JUSTIFY\"\u003e \u003c/p\u003e\u003c/font\u003e \u003cp align\u003d\"JUSTIFY\"\u003eSample Output\u003c/p\u003e \u003cfont face\u003d\"Courier New\"\u003e \u003cpre\u003e3 1 3 7 9\n5 2 4 6 8\n\u003c/pre\u003e \u003c/font\u003e "}}]}