{"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\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":"PLAIN","content":"XHK提出了一个全新的概念,美丽的字符串!\n什么是美丽的字符串呢?那就是任意在一个字符串内任意两个相邻的字符不相同,则为美丽的字符串\n现在XHK有一个美丽的字符串,只包含a,b,b三个字母,但是不幸的是在他去网吧上网的时候,有些位置上的字符因为被隔壁的精神小伙弹出的烟头所污染,变成了问号,现在XHK希望你能帮助他恢复成原来的字符串,如果可能恢复的字符串有多种,你只要输出其中的一种就好啦。\n当然,你们也知道XHK说的最多的一句话就是\"我傻逼了艹\",所以有可能被污染过后的字符串根本无法恢复!!这时候你只要输出-1就好了"}},{"title":"Input","value":{"format":"PLAIN","content":"输入第一行是一个整数T,代表接下来T行有T个字符串需要你恢复(T≤1000)\n接下来T行,每行都包含一个待修复的字符串\n这些字符串长度的总和不超过1e5"}},{"title":"Output","value":{"format":"PLAIN","content":"如果可以修复,你只需要输出任一方案\n如果不能修复输出-1就好啦"}},{"title":"Example","value":{"format":"PLAIN","content":"输入\n3\na??bcb\na??bcc\nacb?c\n输出:\nababcb\n-1\nacbac"}}]}