{"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\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":"对于任意一个字符串s,定义如下操作:\u003cbr\u003e\n如果字符串s能被看作相同的k个字符串构成,则称字符串是k-复读的。\u003cbr\u003e\n例如字符串bbcbbcbbcbbc是1-复读、2-复读、4-复读的。\n\n现在,给定你一个仅包含小写字母的字符串s和一个正整数k,问能否将字符串s打乱后重新组合,使得他是k-复读的。\u003cbr\u003e"}},{"title":"Input","value":{"format":"HTML","content":"第一行给定一个正整数k (1 \u003c\u003d k \u003c\u003d 1000)。\u003cbr\u003e\n第二行给定一个仅包含小写字母的字符串s。(1 \u003c\u003d |s| \u003c\u003d 1000),|s|表示字符串长度。\n"}},{"title":"Output","value":{"format":"HTML","content":"如果字符串s打乱组合后满足k-复读,输出这个新的字符串\u003cbr\u003e\n如果字符串s有多种组合情况满足题目要求,可任意输出其中一种。\u003cbr\u003e\n如果没有任何一种情况满足题意,则输出-1。\n"}},{"title":"Sample Input","value":{"format":"HTML","content":"4\u003cbr\u003e\nbbbbccbbccbb"}},{"title":"Sample Output","value":{"format":"HTML","content":"bbcbbcbbcbbc"}}]}