{"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 bitwise XOR takes two bit patterns of equal length and performs the logical exclusive OR operation on each pair of corresponding bits. The result in each position is $$$1$$$ if both bits are different (only one of them is $$$1$$$ and the other is $$$0$$$), but will be $$$0$$$ if both bits are the same (both are $$$0$$$ or both are $$$1$$$). For example, the bitwise XOR of the patterns $$$0101$$$ and $$$1100$$$ is $$$1001$$$.\u003c/p\u003e\u003cp\u003eIn this problem, you are given $$$3$$$ binary strings of lengths $$$10$$$ digits such that all digits are either $$$0$$$ or $$$1$$$. You can swap any two digits in the same string infinitely, but you cannot swap two digits from two different strings.\u003c/p\u003e\u003cp\u003eYour task is to rearrange digits in the given strings in a way such that the bitwise XOR of the strings after rearranging their digits is as largest as possible. Can you?\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe first line contains an integer $$$T$$$ ($$$1 \\le T \\le 250$$$) specifying the number of test cases.\u003c/p\u003e\u003cp\u003eEach test case consists of $$$3$$$ lines each of which contains a binary string of length $$$10$$$ digits such that all digits are either $$$0$$$ or $$$1$$$. \u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eFor each test, print a single line containing a binary string of length $$$10$$$ representing the largest value of bitwise XOR that can be optioned by rearranging digits in each string.\u003c/p\u003e\u003cp\u003eA binary string $$$x$$$ is larger than a binary string $$$y$$$ if after converting both strings to the decimal representation, the decimal value of string $$$x$$$ is larger than the decimal value of string $$$y$$$. For example, string \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e1100\u003c/span\u003e\" is larger than string \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e0101\u003c/span\u003e\" because its decimal value $$$12$$$, while the decimal value of string \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e0101\u003c/span\u003e\" is $$$5$$$.\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\u003e2\n0000101011\n0001010101\n0010010000\n1000000010\n0001000100\n1001000000\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1111111111\n1111110000\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Note","value":{"format":"HTML","content":"\u003cp\u003eIn the first test case, you can rearrange the given strings as follow: \u003c/p\u003e\u003cul\u003e \u003cli\u003e \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e0000101011\u003c/span\u003e\" $$$\\rightarrow$$$ \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e0000111100\u003c/span\u003e\" \u003c/li\u003e\u003cli\u003e \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e0001010101\u003c/span\u003e\" $$$\\rightarrow$$$ \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e1111000000\u003c/span\u003e\" \u003c/li\u003e\u003cli\u003e \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e0010010000\u003c/span\u003e\" $$$\\rightarrow$$$ \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e0000000011\u003c/span\u003e\" \u003c/li\u003e\u003c/ul\u003e"}}]}