{"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\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027$$$$$$\u0027, right: \u0027$$$$$$\u0027, display: true},\n {left: \u0027$$$\u0027, right: \u0027$$$\u0027, display: false},\n {left: \u0027$$\u0027, right: \u0027$$\u0027, display: true},\n {left: \u0027$\u0027, right: \u0027$\u0027, display: false}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eAquaMoon had $$$n$$$ strings of length $$$m$$$ each. $$$n$$$ is an \u003cspan class\u003d\"tex-font-style-bf\"\u003eodd\u003c/span\u003e number.\u003c/p\u003e\u003cp\u003eWhen AquaMoon was gone, Cirno tried to pair these $$$n$$$ strings together. After making $$$\\frac{n-1}{2}$$$ pairs, she found out that there was exactly one string without the pair!\u003c/p\u003e\u003cp\u003eIn her rage, she disrupted each pair of strings. For each pair, she selected some positions (at least $$$1$$$ and at most $$$m$$$) and swapped the letters in the two strings of this pair at the selected positions.\u003c/p\u003e\u003cp\u003eFor example, if $$$m \u003d 6$$$ and two strings \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eabcdef\u003c/span\u003e\" and \"\u003cspan class\u003d\"tex-font-style-tt\"\u003exyzklm\u003c/span\u003e\" are in one pair and Cirno selected positions $$$2$$$, $$$3$$$ and $$$6$$$ she will swap \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003eb\u003c/span\u003e\u0027 with \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003ey\u003c/span\u003e\u0027, \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003ec\u003c/span\u003e\u0027 with \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003ez\u003c/span\u003e\u0027 and \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003ef\u003c/span\u003e\u0027 with \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003em\u003c/span\u003e\u0027. The resulting strings will be \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eayzdem\u003c/span\u003e\" and \"\u003cspan class\u003d\"tex-font-style-tt\"\u003exbcklf\u003c/span\u003e\".\u003c/p\u003e\u003cp\u003eCirno then stole away the string without pair and shuffled all remaining strings in arbitrary order.\u003c/p\u003e\u003cp\u003eAquaMoon found the remaining $$$n-1$$$ strings in complete disarray. Also, she remembers the initial $$$n$$$ strings. She wants to know which string was stolen, but she is not good at programming. Can you help her?\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003e\u003cspan class\u003d\"tex-font-style-bf\"\u003eThis problem is made as interactive. It means, that your solution will read the input, given by the interactor. But the interactor will give you the full input at the beginning and after that, you should print the answer. So you should solve the problem, like as you solve the usual, non-interactive problem because you won\u0027t have any interaction process. The only thing you should not forget is to flush the output buffer, after printing the answer. Otherwise, you can get an \"Idleness limit exceeded\" verdict. Refer to the \u003ca href\u003d\"https://codeforces.com/blog/entry/45307\"\u003einteractive problems guide\u003c/a\u003e for the detailed information about flushing the output buffer.\u003c/span\u003e\u003c/p\u003e\u003cp\u003eThe input consists of multiple test cases. The first line contains a single integer $$$t$$$ ($$$1 \\leq t \\leq 100$$$) — the number of test cases.\u003c/p\u003e\u003cp\u003eThe first line of each test case contains two integers $$$n$$$, $$$m$$$ ($$$1 \\leq n \\leq 10^5$$$, $$$1 \\leq m \\leq 10^5$$$) — the number of strings and the length of each string, respectively.\u003c/p\u003e\u003cp\u003eThe next $$$n$$$ lines each contain a string with length $$$m$$$, describing the original $$$n$$$ strings. All string consists of lowercase Latin letters.\u003c/p\u003e\u003cp\u003eThe next $$$n-1$$$ lines each contain a string with length $$$m$$$, describing the strings after Cirno exchanged and reordered them.\u003c/p\u003e\u003cp\u003eIt is guaranteed that $$$n$$$ is odd and that the sum of $$$n \\cdot m$$$ over all test cases does not exceed $$$10^5$$$.\u003c/p\u003e\u003cp\u003e\u003cspan class\u003d\"tex-font-style-bf\"\u003eHack format\u003c/span\u003e:\u003c/p\u003e\u003cp\u003eThe first line should contain a single integer $$$t$$$. After that $$$t$$$ test cases should follow in the following format:\u003c/p\u003e\u003cp\u003eThe first line should contain two integers $$$n$$$ and $$$m$$$.\u003c/p\u003e\u003cp\u003eThe following $$$n$$$ lines should contain $$$n$$$ strings of length $$$m$$$, describing the original strings.\u003c/p\u003e\u003cp\u003eThe following $$$\\frac{n-1}{2}$$$ lines should describe the pairs. They should contain, in the following order: the index of the first string $$$i$$$ ($$$1 \\leq i \\leq n$$$), the index of the second string $$$j$$$ ($$$1 \\leq j \\leq n$$$, $$$i \\neq j$$$), the number of exchanged positions $$$k$$$ ($$$1 \\leq k \\leq m$$$), and the list of $$$k$$$ positions that are exchanged ($$$k$$$ distinct indices from $$$1$$$ to $$$m$$$ in any order).\u003c/p\u003e\u003cp\u003eThe final line should contain a permutation of integers from $$$1$$$ to $$$n$$$, describing the way the strings should be reordered. The strings will be placed in the order indices placed in this permutation, the stolen string index will be ignored.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eFor each test case print a single line with the stolen string.\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\u003e3\n3 5\naaaaa\nbbbbb\nccccc\naaaaa\nbbbbb\n3 4\naaaa\nbbbb\ncccc\naabb\nbbaa\n5 6\nabcdef\nuuuuuu\nkekeke\nekekek\nxyzklm\nxbcklf\neueueu\nayzdem\nukukuk\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eccccc\ncccc\nkekeke\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, \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eaaaaa\u003c/span\u003e\" and \"\u003cspan class\u003d\"tex-font-style-tt\"\u003ebbbbb\u003c/span\u003e\" exchanged all positions, and \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eccccc\u003c/span\u003e\" is the stolen string.\u003c/p\u003e\u003cp\u003eIn the second test case, \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eaaaa\u003c/span\u003e\" and \"\u003cspan class\u003d\"tex-font-style-tt\"\u003ebbbb\u003c/span\u003e\" exchanged two first positions, and \"\u003cspan class\u003d\"tex-font-style-tt\"\u003ecccc\u003c/span\u003e\" is the stolen string.\u003c/p\u003e\u003cp\u003eThis is the first test in the hack format: \u003c/p\u003e\u003cpre class\u003d\"verbatim\"\u003e\u003cbr\u003e3\u003cbr\u003e3 5\u003cbr\u003eaaaaa\u003cbr\u003ebbbbb\u003cbr\u003eccccc\u003cbr\u003e1 2 5 1 2 3 4 5\u003cbr\u003e2 1 3\u003cbr\u003e3 4\u003cbr\u003eaaaa\u003cbr\u003ebbbb\u003cbr\u003ecccc\u003cbr\u003e1 2 2 1 2\u003cbr\u003e2 1 3\u003cbr\u003e5 6\u003cbr\u003eabcdef\u003cbr\u003euuuuuu\u003cbr\u003ekekeke\u003cbr\u003eekekek\u003cbr\u003exyzklm\u003cbr\u003e1 5 3 2 3 6\u003cbr\u003e2 4 3 2 4 6\u003cbr\u003e5 4 1 2 3\u003cbr\u003e\u003c/pre\u003e"}}]}