{"trustable":false,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\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 type\u003d\"text/javascript\" async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS_HTML-full\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eYou are given a number $$$n$$$ and an array $$$b_1, b_2, \\ldots, b_{n+2}$$$, obtained according to the following algorithm:\u003c/p\u003e\n\u003cul\u003e\n \u003cli\u003esome array $$$a_1, a_2, \\ldots, a_n$$$ was guessed;\u003c/li\u003e\n \u003cli\u003earray $$$a$$$ was written to array $$$b$$$, i.e. $$$b_i \u003d a_i$$$ ($$$1 \\le i \\le n$$$);\u003c/li\u003e\n \u003cli\u003eThe $$$(n+1)$$$-th element of the array $$$b$$$ is the sum of the numbers in the array $$$a$$$, i.e. $$$b_{n+1} \u003d a_1+a_2+\\ldots+a_n$$$;\u003c/li\u003e\n \u003cli\u003eThe $$$(n+2)$$$-th element of the array $$$b$$$ was written some number $$$x$$$ ($$$1 \\le x \\le 10^9$$$), i.e. $$$b_{n+2} \u003d x$$$; \u003c/li\u003e\n\u003cli\u003eThe array $$$b$$$ was shuffled.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eFor example, the array $$$b\u003d[2, 3, 7, 12 ,2]$$$ it could be obtained in the following ways:\u003c/p\u003e\n\u003cul\u003e\n \u003cli\u003e$$$a\u003d[2, 2, 3]$$$ and $$$x\u003d12$$$;\u003c/li\u003e\n \u003cli\u003e$$$a\u003d[3, 2, 7]$$$ and $$$x\u003d2$$$.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eFor the given array $$$b$$$, find any array $$$a$$$ that could have been guessed initially.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe first line contains a single integer $$$t$$$ ($$$1 \\le t \\le 10^4$$$). Then $$$t$$$ test cases follow.\u003c/p\u003e\n\u003cp\u003eThe first line of each test case contains a single integer $$$n$$$ ($$$1 \\le n \\le 2 \\cdot 10^5$$$).\u003c/p\u003e\n\u003cp\u003eThe second row of each test case contains $$$n+2$$$ integers $$$b_1, b_2, \\ldots, b_{n+2}$$$ ($$$1 \\le b_i \\le 10^9$$$).\u003c/p\u003e\n\u003cp\u003eIt is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2 \\cdot 10^5$$$.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eFor each test case, output:\u003c/p\u003e\n\u003cul\u003e\n \u003cli\u003e\"\u003cspan class\u003d\"tex-font-style-tt\"\u003e-1\u003c/span\u003e\", if the array $$$b$$$ could not be obtained from any array $$$a$$$;\u003c/li\u003e\n \u003cli\u003e$$$n$$$ integers $$$a_1, a_2, \\ldots, a_n$$$, otherwise.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eIf there are several arrays of $$$a$$$, you can output any.\u003c/p\u003e"}},{"title":"Sample 1","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\u003e4\n3\n2 3 7 12 2\n4\n9 1 7 1 6 5\n5\n18 2 2 3 2 9 2\n3\n2 6 9 2 1\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e2 3 7 \n-1\n2 2 2 3 9 \n1 2 6 \n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}