{"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\u003eA sequence of square brackets is regular if by inserting symbols \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e+\u003c/span\u003e\" and \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e1\u003c/span\u003e\" into it, you can get a regular mathematical expression from it. For example, sequences \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e[[]][]\u003c/span\u003e\", \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e[]\u003c/span\u003e\" and \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e[[][[]]]\u003c/span\u003e\" — are regular, at the same time \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e][\u003c/span\u003e\", \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e[[]\u003c/span\u003e\" and \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e[[]]][\u003c/span\u003e\" — are irregular. \u003c/p\u003e\u003cp\u003eDraw the given sequence using a minimalistic pseudographics in the strip of the lowest possible height — use symbols \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e+\u003c/span\u003e\u0027, \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e-\u003c/span\u003e\u0027 and \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e|\u003c/span\u003e\u0027. For example, the sequence \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e[[][]][]\u003c/span\u003e\" should be represented as: \u003c/p\u003e\u003cpre class\u003d\"verbatim\"\u003e\u003cbr\u003e+- -++- -+ \u003cbr\u003e|+- -++- -+|| |\u003cbr\u003e|| || ||| |\u003cbr\u003e|+- -++- -+|| |\u003cbr\u003e+- -++- -+\u003cbr\u003e\u003c/pre\u003e\u003cp\u003eEach bracket should be represented with the hepl of one or more symbols \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e|\u003c/span\u003e\u0027 (the vertical part) and symbols \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e+\u003c/span\u003e\u0027 and \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e-\u003c/span\u003e\u0027 as on the example which is given above.\u003c/p\u003e\u003cp\u003eBrackets should be drawn without spaces one by one, only dividing pairs of consecutive pairwise brackets with a single-space bar (so that the two brackets do not visually merge into one symbol). The image should have the minimum possible height. \u003c/p\u003e\u003cp\u003eThe enclosed bracket is always smaller than the surrounding bracket, but each bracket separately strives to maximize the height of the image. So the pair of final brackets in the example above occupies the entire height of the image.\u003c/p\u003e\u003cp\u003eStudy carefully the examples below, they adequately explain the condition of the problem. Pay attention that in this problem the answer (the image) is unique. \u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe first line contains an even integer \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003en\u003c/i\u003e\u003c/span\u003e (\u003cspan class\u003d\"tex-span\"\u003e2 ≤ \u003ci\u003en\u003c/i\u003e ≤ 100\u003c/span\u003e) — the length of the sequence of brackets.\u003c/p\u003e\u003cp\u003eThe second line contains the sequence of brackets — these are \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003en\u003c/i\u003e\u003c/span\u003e symbols \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e[\u003c/span\u003e\" and \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e]\u003c/span\u003e\". It is guaranteed that the given sequence of brackets is regular. \u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003ePrint the drawn bracket sequence in the format which is given in the condition. Don\u0027t print extra (unnecessary) spaces. \u003c/p\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\u003e8\n[[][]][]\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e+- -++- -+\n|+- -++- -+|| |\n|| || ||| |\n|+- -++- -+|| |\n+- -++- -+\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"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\u003e6\n[[[]]]\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e+- -+\n|+- -+|\n||+- -+||\n||| |||\n||+- -+||\n|+- -+|\n+- -+\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"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\u003e6\n[[][]]\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e+- -+\n|+- -++- -+|\n|| || ||\n|+- -++- -+|\n+- -+\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"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\u003e2\n[]\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e+- -+\n| |\n+- -+\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"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\n[][]\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e+- -++- -+\n| || |\n+- -++- -+\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}