{"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":"Example","value":{"format":"HTML","content":"\u003cdiv class\u003d\"sample-test\"\u003e\n \u003cdiv class\u003d\"input\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Input\n \u003c/div\u003e\n \u003cpre\u003e3\n4 a\naaaa\n4 a\nbaaa\n4 b\nbzyx\n\u003c/pre\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"output\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Output\n \u003c/div\u003e\n \u003cpre\u003e0\n1\n2\n2 \n2 3\n\u003c/pre\u003e\n \u003c/div\u003e\n\u003c/div\u003e"}},{"title":"Note","value":{"format":"HTML","content":"\u003cp\u003eLet\u0027s describe what happens in the third test case: \u003c/p\u003e\n\u003col\u003e \n \u003cli\u003e $$$x_1 \u003d 2$$$: we choose all positions that are not divisible by $$$2$$$ and replace them, i.\u0026nbsp;e. \u003cspan class\u003d\"tex-font-style-tt\"\u003e\u003cspan class\u003d\"tex-font-style-underline\"\u003eb\u003c/span\u003ez\u003cspan class\u003d\"tex-font-style-underline\"\u003ey\u003c/span\u003ex\u003c/span\u003e $$$\\rightarrow$$$ \u003cspan class\u003d\"tex-font-style-tt\"\u003ebzbx\u003c/span\u003e; \u003c/li\u003e\n \u003cli\u003e $$$x_2 \u003d 3$$$: we choose all positions that are not divisible by $$$3$$$ and replace them, i.\u0026nbsp;e. \u003cspan class\u003d\"tex-font-style-tt\"\u003e\u003cspan class\u003d\"tex-font-style-underline\"\u003ebz\u003c/span\u003eb\u003cspan class\u003d\"tex-font-style-underline\"\u003ex\u003c/span\u003e\u003c/span\u003e $$$\\rightarrow$$$ \u003cspan class\u003d\"tex-font-style-tt\"\u003ebbbb\u003c/span\u003e. \u003c/li\u003e\n\u003c/ol\u003e"}}]}