{"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\u003eYou are given a string $$$s$$$ consisting of the characters \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e0\u003c/span\u003e\u0027, \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e1\u003c/span\u003e\u0027, and \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e?\u003c/span\u003e\u0027. You need to replace all the characters with \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e?\u003c/span\u003e\u0027 in the string $$$s$$$ by \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e0\u003c/span\u003e\u0027 or \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e1\u003c/span\u003e\u0027 so that the string becomes a palindrome and has \u003cspan class\u003d\"tex-font-style-bf\"\u003eexactly\u003c/span\u003e $$$a$$$ characters \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e0\u003c/span\u003e\u0027 and \u003cspan class\u003d\"tex-font-style-bf\"\u003eexactly\u003c/span\u003e $$$b$$$ characters \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e1\u003c/span\u003e\u0027. Note that each of the characters \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e?\u003c/span\u003e\u0027 is replaced \u003cspan class\u003d\"tex-font-style-bf\"\u003eindependently\u003c/span\u003e from the others.\u003c/p\u003e\u003cp\u003eA string $$$t$$$ of length $$$n$$$ is called a palindrome if the equality $$$t[i] \u003d t[n-i+1]$$$ is true for all $$$i$$$ ($$$1 \\le i \\le n$$$).\u003c/p\u003e\u003cp\u003eFor example, if $$$s\u003d$$$\"\u003cspan class\u003d\"tex-font-style-tt\"\u003e01?????0\u003c/span\u003e\", $$$a\u003d4$$$ and $$$b\u003d4$$$, then you can replace the characters \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e?\u003c/span\u003e\u0027 in the following ways: \u003c/p\u003e\u003cul\u003e \u003cli\u003e \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e01011010\u003c/span\u003e\"; \u003c/li\u003e\u003cli\u003e \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e01100110\u003c/span\u003e\". \u003c/li\u003e\u003c/ul\u003e\u003cp\u003eFor the given string $$$s$$$ and the numbers $$$a$$$ and $$$b$$$, replace all the characters with \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e?\u003c/span\u003e\u0027 in the string $$$s$$$ by \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e0\u003c/span\u003e\u0027 or \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e1\u003c/span\u003e\u0027 so that the string becomes a palindrome and has \u003cspan class\u003d\"tex-font-style-bf\"\u003eexactly\u003c/span\u003e $$$a$$$ characters \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e0\u003c/span\u003e\u0027 and \u003cspan class\u003d\"tex-font-style-bf\"\u003eexactly\u003c/span\u003e $$$b$$$ characters \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e1\u003c/span\u003e\u0027.\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\u003cp\u003eThe first line of each test case contains two integers $$$a$$$ and $$$b$$$ ($$$0 \\le a, b \\le 2 \\cdot 10^5$$$, $$$a + b \\ge 1$$$).\u003c/p\u003e\u003cp\u003eThe second line of each test case contains the string $$$s$$$ of length $$$a+b$$$, consisting of the characters \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e0\u003c/span\u003e\u0027, \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e1\u003c/span\u003e\u0027, and \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e?\u003c/span\u003e\u0027.\u003c/p\u003e\u003cp\u003eIt is guaranteed that the sum of the string lengths of $$$s$$$ 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\u003cul\u003e \u003cli\u003e \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e-1\u003c/span\u003e\", if you can\u0027t replace all the characters \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e?\u003c/span\u003e\u0027 in the string $$$s$$$ by \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e0\u003c/span\u003e\u0027 or \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e1\u003c/span\u003e\u0027 so that the string becomes a palindrome and that it contains \u003cspan class\u003d\"tex-font-style-bf\"\u003eexactly\u003c/span\u003e $$$a$$$ characters \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e0\u003c/span\u003e\u0027 and \u003cspan class\u003d\"tex-font-style-bf\"\u003eexactly\u003c/span\u003e $$$b$$$ characters \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e1\u003c/span\u003e\u0027; \u003c/li\u003e\u003cli\u003e the string that is obtained as a result of the replacement, otherwise. \u003c/li\u003e\u003c/ul\u003e\u003cp\u003eIf there are several suitable ways to replace characters, you can 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\u003e9\n4 4\n01?????0\n3 3\n??????\n1 0\n?\n2 2\n0101\n2 2\n01?0\n0 1\n0\n0 3\n1?1\n2 2\n?00?\n4 3\n??010?0\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e01011010\n-1\n0\n-1\n0110\n-1\n111\n1001\n0101010\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}