{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv\u003e\u003cp\u003eWindy has \u003ci\u003eN\u003c/i\u003e balls of distinct weights from 1 unit to \u003ci\u003eN\u003c/i\u003e units. Now he tries to label them with 1 to \u003ci\u003eN\u003c/i\u003e in such a way that: \u003c/p\u003e\u003col\u003e\u003cli\u003eNo two balls share the same label.\u003c/li\u003e\u003cli\u003eThe labeling satisfies several constrains like \"The ball labeled with \u003ci\u003ea\u003c/i\u003e is lighter than the one labeled with \u003ci\u003eb\".\u003c/i\u003e\u003c/li\u003e\u003c/ol\u003e\u003cp\u003eCan you help windy to find a solution?\u003c/p\u003e\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe first line of input is the number of test case. The first line of each test case contains two integers, \u003ci\u003eN\u003c/i\u003e (1 ≤ \u003ci\u003eN\u003c/i\u003e ≤ 200) and \u003ci\u003eM\u003c/i\u003e (0 ≤ \u003ci\u003eM\u003c/i\u003e ≤ 40,000). The next \u003ci\u003eM\u003c/i\u003e line each contain two integers \u003ci\u003ea\u003c/i\u003e and \u003ci\u003eb\u003c/i\u003e indicating the ball labeled with \u003ci\u003ea\u003c/i\u003e must be lighter than the one labeled with \u003ci\u003eb\u003c/i\u003e. (1 ≤ \u003ci\u003ea, b\u003c/i\u003e ≤ \u003ci\u003eN\u003c/i\u003e) There is a blank line before each test case. \u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eFor each test case output on a single line the balls\u0027 weights from label 1 to label \u003ci\u003eN\u003c/i\u003e. If several solutions exist, you should output the one with the smallest weight for label 1, then with the smallest weight for label 2, then with the smallest weight for label 3 and so on... If no solution exists, output -1 instead.\u003c/p\u003e"}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e5\r\n\r\n4 0\r\n\r\n4 1\r\n1 1\r\n\r\n4 2\r\n1 2\r\n2 1\r\n\r\n4 1\r\n2 1\r\n\r\n4 1\r\n3 2\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1 2 3 4\r\n-1\r\n-1\r\n2 1 3 4\r\n1 3 2 4\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}