{"trustable":true,"prependHtml":"\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 async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"panel_content\"\u003eThe ACM ICPC judges are very careful about not leaking their problems, and all communi- cations are encrypted. However, one does sometimes make mistakes, like using too weak an encryption scheme. Here is an example of that.\u003cbr\u003e\u003cbr\u003eThe encryption chosen was very simple: encrypt each chunk of the input by flipping some bits according to a shared key. To provide reasonable security, the size of both chunk and key is 32 bits.\u003cbr\u003e\u003cbr\u003eThat is, suppose the input was a sequence of m 32-bit integers.\u003cbr\u003e\u003cbr\u003e\u003ccenter\u003eN1 N2 N3 ... Nm\u003c/center\u003e\u003cbr\u003e\u003cbr\u003eAfter encoding with the key K it becomes the following sequence of m 32-bit integers.\u003cbr\u003e\u003cbr\u003e\u003ccenter\u003e(N1 ^ K) (N2 ^ K) (N3 ^ K) ... (Nm ^ K)\u003c/center\u003e\u003cbr\u003e\u003cbr\u003ewhere (a ^ b) is the bitwise exclusive or of a and b.\u003cbr\u003e\u003cbr\u003eExclusive or is the logical operator which is 1 when only one of its operands is 1, and 0 otherwise. Here is its definition for 1-bit integers.\u003cbr\u003e\u003cbr\u003e\u003ccenter\u003e\u003cimg style\u003d\"max-width:100%;\" src\u003d\"CDN_BASE_URL/788d3dc87d0facef256784979fbea63c?v\u003d1713745180\"\u003e\u003c/center\u003e\u003cbr\u003e\u003cbr\u003eAs you can see, it is identical to addition modulo 2. For two 32-bit integers a and b, their bitwise exclusive or a ^ b is defined as follows, using their binary representations, composed of 0\u0027s and 1\u0027s.\u003cbr\u003e\u003cbr\u003e\u003ccenter\u003ea ^ b \u003d a31 ... a1a0 ^ b31 ... b1b0 \u003d c31 ... c1c0\u003c/center\u003e\u003cbr\u003e\u003cbr\u003ewhere\u003cbr\u003e\u003cbr\u003e\u003ccenter\u003e\u003cimg style\u003d\"max-width:100%;\" src\u003d\"CDN_BASE_URL/041e5d0e7783c085773eafb6a6458037?v\u003d1713745180\"\u003e\u003c/center\u003e\u003cbr\u003e\u003cbr\u003eFor instance, using binary notation, 11010110 ^ 01010101 \u003d 10100011, or using hexadecimal, d6 ^ 55 \u003d a3.\u003cbr\u003e\u003cbr\u003eSince this kind of encryption is notoriously weak to statistical attacks, the message has to be compressed in advance, so that it has no statistical regularity. We suppose that N1 N2 ... Nm is already in compressed form.\u003cbr\u003e\u003cbr\u003eHowever, the trouble is that the compression algorithm itself introduces some form of regularity: after every 8 integers of compressed data, it inserts a checksum, the sum of these integers. That is, in the above input, N9 \u003d N1 + N2 + ... + N8, where additions are modulo 2^32.\u003cbr\u003e\u003cbr\u003eLuckily, you could intercept a communication between the judges. Maybe it contains a problem for the finals!\u003cbr\u003e\u003cbr\u003eAs you are very clever, you have certainly seen that you can easily find the lowest bit of the key, denoted by K0. On the one hand, if K0 \u003d 1, then after encoding, the lowest bit of N1^K + N2^K + ... + N8^K is unchanged, as K0 is added an even number of times, but the lowest bit of N9^K is changed, so they shall differ. On the other hand, if K0 \u003d 0, then after encoding, the lowest bit of N1^K + N2^K + ... + N8^K shall still be identical to the lowest bit of N9^K, as they do not change. For instance, if the lowest bits after encoding are 1 1 1 1 1 1 1 1 1 then K0 must be 1, but if they are 1 1 1 1 1 1 1 0 1 then K0 must be 0.\u003cbr\u003e\u003cbr\u003eSo far, so good. Can you do better?\u003cbr\u003e\u003cbr\u003eYou should find the key used for encoding.\u003cbr\u003e\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"The input starts with a line containing only a positive integer S, indicating the number of datasets in the input. S is no more than 1000.\u003cbr\u003e\u003cbr\u003eIt is followed by S datasets. Each dataset is composed of nine 32-bit integers corresponding to the first nine chunks of a communication. They are written in hexadecimal notation, using digits `0\u0027 to `9\u0027 and lowercase letters `a\u0027 to `f\u0027, and with no leading zeros. They are separated by a space or a newline. Each dataset is ended by a newline.\u003cbr\u003e"}},{"title":"Output","value":{"format":"HTML","content":"For each dataset you should output the key used for encoding. Each key shall appear alone on its line, and be written in hexadecimal notation, using digits `0\u0027 to `9\u0027 and lowercase letters `a\u0027 to `f\u0027, and with no leading zeros.\u003cbr\u003e"}},{"title":"Sample","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\r\n1 1 1 1 1 1 1 1 8\r\n3 2 3 2 3 2 3 2 6\r\n3 4 4 7 7 b a 2 2e\r\ne1 13 ce 28 ca 6 ab 46 a6d\r\nb08 49e2 6128 f27 8cf2 bc50 7380 7fe1 723b\r\n4eba eb4 a352 fd14 6ac1 eed1 dd06 bb83 392bc\r\nef593c08 847e522f 74c02b9c 26f3a4e1 e2720a01 6fe66007\r\n7a4e96ad 6ee5cef6 3853cd88\r\n60202fb8 757d6d66 9c3a9525 fbcd7983 82b9571c ddc54bab 853e52da\r\n22047c88 e5524401\r\n8\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e0\r\n2\r\n6\r\n1c6\r\n4924afc7\r\nffff95c5\r\n546991d\r\n901c4a16\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}