{"trustable":true,"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\u003eMerge sort is a well-known sorting algorithm. The main function that sorts the elements of array \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ea\u003c/i\u003e\u003c/span\u003e with indices from \u003cspan class\u003d\"tex-span\"\u003e[\u003ci\u003el\u003c/i\u003e, \u003ci\u003er\u003c/i\u003e)\u003c/span\u003e can be implemented as follows:\u003c/p\u003e\u003col\u003e \u003cli\u003e If the segment \u003cspan class\u003d\"tex-span\"\u003e[\u003ci\u003el\u003c/i\u003e, \u003ci\u003er\u003c/i\u003e)\u003c/span\u003e is already sorted in non-descending order (that is, for any \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ei\u003c/i\u003e\u003c/span\u003e such that \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003el\u003c/i\u003e ≤ \u003ci\u003ei\u003c/i\u003e \u0026lt; \u003ci\u003er\u003c/i\u003e - 1\u003c/span\u003e \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ea\u003c/i\u003e[\u003ci\u003ei\u003c/i\u003e] ≤ \u003ci\u003ea\u003c/i\u003e[\u003ci\u003ei\u003c/i\u003e + 1]\u003c/span\u003e), then end the function call; \u003c/li\u003e\u003cli\u003e Let \u003cimg align\u003d\"middle\" class\u003d\"tex-formula\" src\u003d\"CDN_BASE_URL/cac25960908f0f2c48d62fc3be281117?v\u003d1714327575\" style\u003d\"max-width: 100.0%;max-height: 100.0%;\"\u003e; \u003c/li\u003e\u003cli\u003e Call \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003emergesort\u003c/i\u003e(\u003ci\u003ea\u003c/i\u003e, \u003ci\u003el\u003c/i\u003e, \u003ci\u003emid\u003c/i\u003e)\u003c/span\u003e; \u003c/li\u003e\u003cli\u003e Call \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003emergesort\u003c/i\u003e(\u003ci\u003ea\u003c/i\u003e, \u003ci\u003emid\u003c/i\u003e, \u003ci\u003er\u003c/i\u003e)\u003c/span\u003e; \u003c/li\u003e\u003cli\u003e Merge segments \u003cspan class\u003d\"tex-span\"\u003e[\u003ci\u003el\u003c/i\u003e, \u003ci\u003emid\u003c/i\u003e)\u003c/span\u003e and \u003cspan class\u003d\"tex-span\"\u003e[\u003ci\u003emid\u003c/i\u003e, \u003ci\u003er\u003c/i\u003e)\u003c/span\u003e, making the segment \u003cspan class\u003d\"tex-span\"\u003e[\u003ci\u003el\u003c/i\u003e, \u003ci\u003er\u003c/i\u003e)\u003c/span\u003e sorted in non-descending order. The merge algorithm doesn\u0027t call any other functions. \u003c/li\u003e\u003c/ol\u003e\u003cp\u003eThe array in this problem is \u003cspan class\u003d\"tex-span\"\u003e0\u003c/span\u003e-indexed, so to sort the whole array, you need to call \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003emergesort\u003c/i\u003e(\u003ci\u003ea\u003c/i\u003e, 0, \u003ci\u003en\u003c/i\u003e)\u003c/span\u003e.\u003c/p\u003e\u003cp\u003eThe number of calls of function \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003emergesort\u003c/i\u003e\u003c/span\u003e is very important, so Ivan has decided to calculate it while sorting the array. For example, if \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ea\u003c/i\u003e \u003d {1, 2, 3, 4}\u003c/span\u003e, then there will be \u003cspan class\u003d\"tex-span\"\u003e1\u003c/span\u003e call of \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003emergesort\u003c/i\u003e\u003c/span\u003e — \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003emergesort\u003c/i\u003e(0, 4)\u003c/span\u003e, which will check that the array is sorted and then end. If \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ea\u003c/i\u003e \u003d {2, 1, 3}\u003c/span\u003e, then the number of calls is \u003cspan class\u003d\"tex-span\"\u003e3\u003c/span\u003e: first of all, you call \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003emergesort\u003c/i\u003e(0, 3)\u003c/span\u003e, which then sets \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003emid\u003c/i\u003e \u003d 1\u003c/span\u003e and calls \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003emergesort\u003c/i\u003e(0, 1)\u003c/span\u003e and \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003emergesort\u003c/i\u003e(1, 3)\u003c/span\u003e, which do not perform any recursive calls because segments \u003cspan class\u003d\"tex-span\"\u003e(0, 1)\u003c/span\u003e and \u003cspan class\u003d\"tex-span\"\u003e(1, 3)\u003c/span\u003e are sorted.\u003c/p\u003e\u003cp\u003eIvan has implemented the program that counts the number of \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003emergesort\u003c/i\u003e\u003c/span\u003e calls, but now he needs to test it. To do this, he needs to find an array \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ea\u003c/i\u003e\u003c/span\u003e such that \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ea\u003c/i\u003e\u003c/span\u003e is a permutation of size \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003en\u003c/i\u003e\u003c/span\u003e (that is, the number of elements in \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ea\u003c/i\u003e\u003c/span\u003e is \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003en\u003c/i\u003e\u003c/span\u003e, and every integer number from \u003cspan class\u003d\"tex-span\"\u003e[1, \u003ci\u003en\u003c/i\u003e]\u003c/span\u003e can be found in this array), and the number of \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003emergesort\u003c/i\u003e\u003c/span\u003e calls when sorting the array is exactly \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ek\u003c/i\u003e\u003c/span\u003e.\u003c/p\u003e\u003cp\u003eHelp Ivan to find an array he wants!\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe first line contains two numbers \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003en\u003c/i\u003e\u003c/span\u003e and \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ek\u003c/i\u003e\u003c/span\u003e (\u003cspan class\u003d\"tex-span\"\u003e1 ≤ \u003ci\u003en\u003c/i\u003e ≤ 100000\u003c/span\u003e, \u003cspan class\u003d\"tex-span\"\u003e1 ≤ \u003ci\u003ek\u003c/i\u003e ≤ 200000\u003c/span\u003e) — the size of a desired permutation and the number of \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003emergesort\u003c/i\u003e\u003c/span\u003e calls required to sort it.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eIf a permutation of size \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003en\u003c/i\u003e\u003c/span\u003e such that there will be exactly \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ek\u003c/i\u003e\u003c/span\u003e calls of \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003emergesort\u003c/i\u003e\u003c/span\u003e while sorting it doesn\u0027t exist, output \u003cspan class\u003d\"tex-span\"\u003e - 1\u003c/span\u003e. Otherwise output \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003en\u003c/i\u003e\u003c/span\u003e integer numbers \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ea\u003c/i\u003e[0], \u003ci\u003ea\u003c/i\u003e[1], ..., \u003ci\u003ea\u003c/i\u003e[\u003ci\u003en\u003c/i\u003e - 1]\u003c/span\u003e — the elements of a permutation that would meet the required conditions. If there are multiple answers, print any of them.\u003c/p\u003e"}},{"title":"Examples","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\u003e3 3\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e2 1 3 \u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"","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 1\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1 2 3 4 \u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"","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 6\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e-1\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}