{"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\u003eA string is called beautiful if no two consecutive characters are equal. For example, \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eababcb\u003c/span\u003e\", \"\u003cspan class\u003d\"tex-font-style-tt\"\u003ea\u003c/span\u003e\" and \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eabab\u003c/span\u003e\" are beautiful strings, while \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eaaaaaa\u003c/span\u003e\", \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eabaa\u003c/span\u003e\" and \"\u003cspan class\u003d\"tex-font-style-tt\"\u003ebb\u003c/span\u003e\" are not.\u003c/p\u003e\u003cp\u003eAhcl wants to construct a beautiful string. He has a string $$$s$$$, consisting of only characters \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003ea\u003c/span\u003e\u0027, \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003eb\u003c/span\u003e\u0027, \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003ec\u003c/span\u003e\u0027 and \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e?\u003c/span\u003e\u0027. Ahcl needs to replace each character \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e?\u003c/span\u003e\u0027 with one of the three characters \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003ea\u003c/span\u003e\u0027, \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003eb\u003c/span\u003e\u0027 or \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003ec\u003c/span\u003e\u0027, such that the resulting string is beautiful. Please help him!\u003c/p\u003e\u003cp\u003eMore formally, after replacing all characters \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e?\u003c/span\u003e\u0027, the condition $$$s_i \\neq s_{i+1}$$$ should be satisfied for all $$$1 \\leq i \\leq |s| - 1$$$, where $$$|s|$$$ is the length of the string $$$s$$$.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe first line contains positive integer $$$t$$$ ($$$1 \\leq t \\leq 1000$$$)\u0026nbsp;— the number of test cases. Next $$$t$$$ lines contain the descriptions of test cases.\u003c/p\u003e\u003cp\u003eEach line contains a non-empty string $$$s$$$ consisting of only characters \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003ea\u003c/span\u003e\u0027, \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003eb\u003c/span\u003e\u0027, \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003ec\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 in each test case a string $$$s$$$ has at least one character \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e?\u003c/span\u003e\u0027. The sum of lengths of strings $$$s$$$ in all test cases does not exceed $$$10^5$$$.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eFor each test case given in the input print the answer in the following format:\u003c/p\u003e\u003cul\u003e \u003cli\u003e If it is impossible to create a beautiful string, print \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e-1\u003c/span\u003e\" (without quotes); \u003c/li\u003e\u003cli\u003e Otherwise, print the resulting beautiful string after replacing all \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e?\u003c/span\u003e\u0027 characters. If there are multiple answers, you can print any of them. \u003c/li\u003e\u003c/ul\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\na???cb\na??bbc\na?b?c\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eababcb\n-1\nacbac\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\u003eIn the first test case, all possible correct answers are \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eababcb\u003c/span\u003e\", \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eabcacb\u003c/span\u003e\", \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eabcbcb\u003c/span\u003e\", \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eacabcb\u003c/span\u003e\" and \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eacbacb\u003c/span\u003e\". The two answers \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eabcbab\u003c/span\u003e\" and \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eabaabc\u003c/span\u003e\" are incorrect, because you can replace only \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e?\u003c/span\u003e\u0027 characters and the resulting string must be beautiful.\u003c/p\u003e\u003cp\u003eIn the second test case, it is impossible to create a beautiful string, because the $$$4$$$-th and $$$5$$$-th characters will be always equal.\u003c/p\u003e\u003cp\u003eIn the third test case, the only answer is \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eacbac\u003c/span\u003e\".\u003c/p\u003e"}}]}