{"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\u003e给定一个由小写拉丁字母组成的字符串。\u003c/p\u003e\u003cp\u003e如果字符串中的一对相邻字母在字母表中也是相邻的,那么这对字母被认为是“丑陋”的。例如,字符串 \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eabaca\u003c/span\u003e\" 中在位置 $$$(1, 2)$$$ — \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eab\u003c/span\u003e\" 和 $$$(2, 3)$$$ — \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eba\u003c/span\u003e\" 处包含丑陋的对。字母 \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003ea\u003c/span\u003e\u0027 和 \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003ez\u003c/span\u003e\u0027 在字母表中不被认为是相邻的。\u003c/p\u003e\u003cp\u003e你能否重新排列给定字符串的字母,使得不再存在丑陋的对?你可以选择给定字符串的任意顺序,但不能添加新字母或删除现有的字母。你也可以保持顺序不变。\u003c/p\u003e\u003cp\u003e如果存在多个答案,则输出其中任意一个。\u003c/p\u003e\u003cp\u003e你还需要回答 $$$T$$$ 个单独的查询。\u003c/p\u003e"}},{"title":"输入","value":{"format":"HTML","content":"\u003cp\u003e第一行包含一个整数 $$$T$$$ ($$$1 \\le T \\le 100$$$) — 查询的数量。\u003c/p\u003e\u003cp\u003e接下来的 $$$T$$$ 行中,每行包含字符串 $$$s$$$ $$$(1 \\le |s| \\le 100)$$$ — 下一个查询的字符串。保证字符串只包含小写拉丁字母。\u003c/p\u003e\u003cp\u003e\u003cspan class\u003d\"tex-font-style-bf\"\u003e注意,在黑客中你必须设置 $$$T \u003d 1$$$\u003c/span\u003e。\u003c/p\u003e"}},{"title":"输出","value":{"format":"HTML","content":"\u003cp\u003e输出 $$$T$$$ 行。第 $$$i$$$ 行应包含第 $$$i$$$ 个查询的答案。\u003c/p\u003e\u003cp\u003e如果第 $$$i$$$ 个查询有答案,则输出给定字符串的重新排列,使得不包含丑陋的对。你可以选择给定字符串的任意顺序,但不能添加新字母或删除现有的字母。你也可以保持顺序不变。\u003c/p\u003e\u003cp\u003e如果存在多个答案,则输出其中任意一个。\u003c/p\u003e\u003cp\u003e否则,对于该查询输出 \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eNo answer\u003c/span\u003e\"。\u003c/p\u003e"}},{"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\nabcd\ngg\ncodeforces\nabaca\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003ecadb\ngg\ncodfoerces\nNo answer\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e"}},{"title":"注意","value":{"format":"HTML","content":"\u003cp\u003e在第一个示例中,答案 \"\u003cspan class\u003d\"tex-font-style-tt\"\u003ebdac\u003c/span\u003e\" 也是正确的。\u003c/p\u003e\u003cp\u003e第二个示例展示了只有在字母表中相邻的字母是不允许的。相同的字母是可以的。\u003c/p\u003e\u003cp\u003e对于第三个示例,有很多有效的答案。\u003c/p\u003e"}}]}