{"trustable":true,"prependHtml":"\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"panel_content\"\u003e There are N IT companies which are labeled from 1 to N. Each of them has a branch (a branch is not a company, and companies and branches are all called \"unit\").The branches are labeled from -1 to –N. The branch of company i is labeled as -i. The number of workers of each company and its branch has to fit the rules below:\u003cbr\u003e 1. The number of workers of a company must be larger than that of the branch of it.\u003cbr\u003e 2. There are more workers in company i than company j if and only if there are more workers in the branch of company i than the branch of company j.\u003cbr\u003e Among the companies whose label is larger than i(range from i+1 to n),and the branches whose label is larger than -i (range from -1 to –(i-1) ), there are c[i] units which have more workers than company i.\u003cbr\u003e You need to sort the 2×N units in the ascending order by the number of workers.\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":" The input contains multiple test cases. Each test case begins with a single line containing one integer N indicating the number of companies (0 \u0026lt; N ≤ 100000). Next line contains N integers which are c[1],c[2]…c[N] (c[i] ≤ N).\u003cbr\u003e The input ends with N \u003d 0."}},{"title":"Output","value":{"format":"HTML","content":" For each test case, output the sorted label sequence of all units in a line. If there are no solutions, output \"Impossible\" instead.\u003cbr\u003e This problem is special judged."}},{"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\u003e2\r\n1 1\r\n10\r\n4 8 3 4 2 0 5 7 1 6\r\n0\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eImpossible\r\n-8 -2 -10 -7 8 2 10 -4 7 -1 4 -3 -5 -9 1 3 5 9 -6 6\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}