{"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\u003eYou are given a ternary string (it is a string which consists only of characters \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e0\u003c/span\u003e\u0027, \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e1\u003c/span\u003e\u0027 and \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e2\u003c/span\u003e\u0027).\u003c/p\u003e\u003cp\u003eYou can swap any two adjacent (consecutive) characters \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e0\u003c/span\u003e\u0027 and \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e1\u003c/span\u003e\u0027 (i.e. replace \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e01\u003c/span\u003e\" with \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e10\u003c/span\u003e\" or vice versa) or any two adjacent (consecutive) characters \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e1\u003c/span\u003e\u0027 and \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e2\u003c/span\u003e\u0027 (i.e. replace \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e12\u003c/span\u003e\" with \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e21\u003c/span\u003e\" or vice versa).\u003c/p\u003e\u003cp\u003eFor example, for string \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e010210\u003c/span\u003e\" we can perform the following moves: \u003c/p\u003e\u003cul\u003e \u003cli\u003e \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e\u003cspan class\u003d\"tex-font-style-underline\"\u003e01\u003c/span\u003e0210\u003c/span\u003e\" $$$\\rightarrow$$$ \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e\u003cspan class\u003d\"tex-font-style-underline\"\u003e10\u003c/span\u003e0210\u003c/span\u003e\"; \u003c/li\u003e\u003cli\u003e \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e0\u003cspan class\u003d\"tex-font-style-underline\"\u003e10\u003c/span\u003e210\u003c/span\u003e\" $$$\\rightarrow$$$ \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e0\u003cspan class\u003d\"tex-font-style-underline\"\u003e01\u003c/span\u003e210\u003c/span\u003e\"; \u003c/li\u003e\u003cli\u003e \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e010\u003cspan class\u003d\"tex-font-style-underline\"\u003e21\u003c/span\u003e0\u003c/span\u003e\" $$$\\rightarrow$$$ \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e010\u003cspan class\u003d\"tex-font-style-underline\"\u003e12\u003c/span\u003e0\u003c/span\u003e\"; \u003c/li\u003e\u003cli\u003e \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e0102\u003cspan class\u003d\"tex-font-style-underline\"\u003e10\u003c/span\u003e\u003c/span\u003e\" $$$\\rightarrow$$$ \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e0102\u003cspan class\u003d\"tex-font-style-underline\"\u003e01\u003c/span\u003e\u003c/span\u003e\". \u003c/li\u003e\u003c/ul\u003e\u003cp\u003eNote than you cannot swap \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e\u003cspan class\u003d\"tex-font-style-underline\"\u003e02\u003c/span\u003e\u003c/span\u003e\" $$$\\rightarrow$$$ \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e\u003cspan class\u003d\"tex-font-style-underline\"\u003e20\u003c/span\u003e\u003c/span\u003e\" and vice versa. You cannot perform any other operations with the given string excluding described above.\u003c/p\u003e\u003cp\u003eYou task is to obtain the minimum possible (lexicographically) string by using these swaps arbitrary number of times (\u003cspan class\u003d\"tex-font-style-it\"\u003epossibly, zero\u003c/span\u003e).\u003c/p\u003e\u003cp\u003eString $$$a$$$ is lexicographically less than string $$$b$$$ (if strings $$$a$$$ and $$$b$$$ have the same length) if there exists some position $$$i$$$ ($$$1 \\le i \\le |a|$$$, where $$$|s|$$$ is the length of the string $$$s$$$) such that for every $$$j \u0026lt; i$$$ holds $$$a_j \u003d b_j$$$, and $$$a_i \u0026lt; b_i$$$.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe first line of the input contains the string $$$s$$$ consisting only of characters \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e0\u003c/span\u003e\u0027, \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e1\u003c/span\u003e\u0027 and \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e2\u003c/span\u003e\u0027, its length is between $$$1$$$ and $$$10^5$$$ (inclusive).\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003ePrint a single string — the minimum possible (lexicographically) string you can obtain by using the swaps described above arbitrary number of times (\u003cspan class\u003d\"tex-font-style-it\"\u003epossibly, zero\u003c/span\u003e).\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\u003e100210\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e001120\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\u003e11222121\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e11112222\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\u003e20\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e20\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}