{"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\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027$$$$$$\u0027, right: \u0027$$$$$$\u0027, display: true},\n {left: \u0027$$$\u0027, right: \u0027$$$\u0027, display: false},\n {left: \u0027$$\u0027, right: \u0027$$\u0027, display: true},\n {left: \u0027$\u0027, right: \u0027$\u0027, display: false}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eIn the game of Mastermind, there are two players \u0026nbsp;— Alice and Bob. Alice has a secret code, which Bob tries to guess. Here, a code is defined as a sequence of $$$n$$$ colors. There are exactly $$$n+1$$$ colors in the entire universe, numbered from $$$1$$$ to $$$n+1$$$ inclusive.\u003c/p\u003e\u003cp\u003eWhen Bob guesses a code, Alice tells him some information about how good of a guess it is, in the form of two integers $$$x$$$ and $$$y$$$.\u003c/p\u003e\u003cp\u003eThe first integer $$$x$$$ is the number of indices where Bob\u0027s guess correctly matches Alice\u0027s code. The second integer $$$y$$$ is the size of the intersection of the two codes as multisets. That is, if Bob were to change the order of the colors in his guess, $$$y$$$ is the maximum number of indices he could get correct.\u003c/p\u003e\u003cp\u003eFor example, suppose $$$n\u003d5$$$, Alice\u0027s code is $$$[3,1,6,1,2]$$$, and Bob\u0027s guess is $$$[3,1,1,2,5]$$$. At indices $$$1$$$ and $$$2$$$ colors are equal, while in the other indices they are not equal. So $$$x\u003d2$$$. And the two codes have the four colors $$$1,1,2,3$$$ in common, so $$$y\u003d4$$$.\u003c/p\u003e\u003ccenter\u003e \u003cimg class\u003d\"tex-graphics\" src\u003d\"CDN_BASE_URL/393b38b4d896c2c66f459be5a5011986?v\u003d1726461486\" style\u003d\"max-width: 100.0%;max-height: 100.0%;\"\u003e Solid lines denote a matched color for the same index. Dashed lines denote a matched color at a different index. $$$x$$$ is the number of solid lines, and $$$y$$$ is the total number of lines. \u003c/center\u003e\u003cp\u003eYou are given Bob\u0027s guess and two values $$$x$$$ and $$$y$$$. Can you find one possibility of Alice\u0027s code so that the values of $$$x$$$ and $$$y$$$ are correct?\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe first line contains a single integer $$$t$$$ ($$$1\\le t\\le 1000$$$) \u0026nbsp;— the number of test cases. Next $$$2t$$$ lines contain descriptions of test cases.\u003c/p\u003e\u003cp\u003eThe first line of each test case contains three integers $$$n,x,y$$$ ($$$1\\le n\\le 10^5, 0\\le x\\le y\\le n$$$) \u0026nbsp;— the length of the codes, and two values Alice responds with.\u003c/p\u003e\u003cp\u003eThe second line of each test case contains $$$n$$$ integers $$$b_1,\\ldots,b_n$$$ ($$$1\\le b_i\\le n+1$$$) \u0026nbsp;— Bob\u0027s guess, where $$$b_i$$$ is the $$$i$$$-th color of the guess.\u003c/p\u003e\u003cp\u003eIt is guaranteed that the sum of $$$n$$$ across all test cases does not exceed $$$10^5$$$.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eFor each test case, on the first line, output \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eYES\u003c/span\u003e\" if there is a solution, or \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eNO\u003c/span\u003e\" if there is no possible secret code consistent with the described situation. You can print each character in any case (upper or lower).\u003c/p\u003e\u003cp\u003eIf the answer is \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eYES\u003c/span\u003e\", on the next line output $$$n$$$ integers $$$a_1,\\ldots,a_n$$$ ($$$1\\le a_i\\le n+1$$$) \u0026nbsp;— Alice\u0027s secret code, where $$$a_i$$$ is the $$$i$$$-th color of the code.\u003c/p\u003e\u003cp\u003eIf there are multiple solutions, output any.\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\u003e7\n5 2 4\n3 1 1 2 5\n5 3 4\n1 1 2 1 2\n4 0 4\n5 5 3 3\n4 1 4\n2 3 2 3\n6 1 2\n3 2 1 1 1 1\n6 2 4\n3 3 2 1 1 1\n6 2 6\n1 1 3 2 1 1\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eYES\n3 1 6 1 2\nYES\n3 1 1 1 2\nYES\n3 3 5 5\nNO\nYES\n4 4 4 4 3 1\nYES\n3 1 3 1 7 7\nYES\n2 3 1 1 1 1\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Note","value":{"format":"HTML","content":"\u003cp\u003eThe first test case is described in the statement.\u003c/p\u003e\u003cp\u003eIn the second test case, $$$x\u003d3$$$ because the colors are equal at indices $$$2,4,5$$$. And $$$y\u003d4$$$ because they share the colors $$$1,1,1,2$$$.\u003c/p\u003e\u003cp\u003eIn the third test case, $$$x\u003d0$$$ because there is no index where the colors are the same. But $$$y\u003d4$$$ because they share the colors $$$3,3,5,5$$$.\u003c/p\u003e\u003cp\u003eIn the fourth test case, it can be proved that no solution exists.\u003c/p\u003e"}}]}