{"trustable":true,"prependHtml":"\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027\\\\(\u0027, right: \u0027\\\\)\u0027, display: false},\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eBaoBao is now learning a new binary operation between two positive integers, represented by $\\otimes$, in his magic book. The book tells him that the result of such operation is calculated by concatenating all multiple results of each digit in the two integers.\u003c/p\u003e\r\n\r\n\u003cp\u003eFormally speaking, let the first integer be $A \u003d a_1a_2 \\dots a_n$, where $a_i$ indicates the $i$-th digit in $A$, and the second integer be $B \u003d b_1b_2 \\dots b_m$, where $b_i$ indicates the $i$-th digit in $B$. We have $A \\otimes B \u003d \\sum\\limits_{i\u003d1}^n\\sum\\limits_{j\u003d1}^m a_ib_j \u003d a_1b_1 + a_1b_2 + \\dots + a_1b_m + a_2b_1 + \\dots + a_nb_m$ Note that the result of $a_ib_j$ is considered to be a \\textbf{string} (without leading zeros if $a_ib_j \u0026gt; 0$, or contains exactly one `0\u0027 if $a_ib_j \u003d 0$), NOT a normal integer. Also, the sum here means \\textbf{string concatenation}, NOT the normal addition operation.\u003c/p\u003e\r\n\r\n\u003cp\u003eFor example, 23 $\\otimes$ 45 \u003d 8101215. Because $8\u003d2 \\times 4$, $10\u003d2 \\times 5$, $12\u003d3 \\times 4$ and $15\u003d3 \\times 5$.\u003c/p\u003e\r\n\r\n\u003cp\u003eBaoBao is very smart and soon knows how to do the inverse operation of $\\otimes$. Now he gives you the result of a $\\otimes$ operation and the numbers of digits in the two original integers. Please help him to restore the two original integers $A$ and $B$.\u003c/p\u003e\r\n\r\n\u003ch4\u003eInput\u003c/h4\u003e\r\n\u003cp\u003eThere are multiple test cases. The first line of the input contains an integer $T$, indicating the number of test cases. For each test case:\u003c/p\u003e\r\n\r\n\u003cp\u003eThe first line contains two positive integers $n$ and $m$ ($1 \\le n, m \\le 2 \\times 10^5$), where $n$ indicates the length of $A$ and $m$ indicates the length of $B$. Here length of an integer means the length of the string when writing the number in decimal notation without leading zeros.\u003c/p\u003e\r\n\r\n\u003cp\u003eThe second line contains only one positive integer $C$ without leading zeros, indicating the result of $A \\otimes B$. The length of $C$ is no more than $2 \\times 10^5$.\u003c/p\u003e\r\n\r\n\u003cp\u003eIt\u0027s guaranteed that the sum of lengths of $C$ over all test cases will not exceed $2 \\times 10^6$.\u003c/p\u003e\r\n\r\n\u003ch4\u003eOutput\u003c/h4\u003e\r\n\u003cp\u003eFor each test case output one line.\u003c/p\u003e\r\n\r\n\u003cp\u003eIf there exist such $A$ and $B$ that $A \\otimes B \u003d C$, output one line containing two integers $A$ and $B$ separated by one space. Note that $A$ and $B$ should be positive integers without leading zeros, the length of $A$ should be exactly $n$, and the length of $B$ should be exactly $m$.\u003c/p\u003e\r\n\r\n\u003cp\u003eIf there are multiple valid answers, output the answer with the smallest $A$; If there are still more than one answer, output one of them with the smallest $B$.\u003c/p\u003e\r\n\r\n\u003cp\u003eIf such $A$ and $B$ do not exist, print \"Impossible\" (without quotes) on a single line.\u003c/p\u003e\r\n\r\n\u003ch4\u003eSample\u003c/h4\u003e\n\u003ctable class\u003d\"vjudge_sample\"\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\r\n2 2\r\n8101215\r\n3 4\r\n100000001000\r\n2 2\r\n80101215\r\n3 4\r\n1000000010000\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e23 45\r\n101 1000\r\nImpossible\r\nImpossible\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\r\n"}}]}