{"raw_statement":[{"iden":"statement","content":"Write a program to convert numbers in one base to numbers in a second base. There are $62$ different digits:\n\n$\\{ 0\\sim 9, A\\sim Z,a\\sim z \\}$\n\nHINT: If you make a sequence of base conversions using the output of one conversion as the input to the next, when you get back to the original base, you should get the original number.\n"},{"iden":"input","content":"The first line of input contains a single positive integer. This is the number of lines that follow. Each of the following lines will have a (decimal) input base followed by a (decimal) output base followed by a number expressed in the input base. Both the input base and the output base will be in the range from $2$ to $62$. That is (in decimal) $A = 10, B = 11, \\dots, Z = 35, a = 36, b = 37, \\dots, z = 61$ ($0\\sim 9$ have their usual meanings)."},{"iden":"output","content":"The output of the program should consist of three lines of output for each base conversion performed. The first line should be the input base in decimal followed by a space then the input number (as given expressed in the input base). The second output line should be the output base followed by a space then the input number (as expressed in the output base). The third output line is blank."},{"iden":"note","content":"题目保证 $1\\le T\\le 100$，要转换的数字是不超过 $10^{110}$ 的自然数。"}],"translated_statement":null,"sample_group":[["8\n62 2 abcdefghiz\n10 16 1234567890123456789012345678901234567890\n16 35 3A0C92075C0DBF3B8ACBC5F96CE3F0AD2\n35 23 333YMHOUE8JPLT7OX6K9FYCQ8A\n23 49 946B9AA02MI37E3D3MMJ4G7BL2F05\n49 61 1VbDkSIMJL3JjRgAdlUfcaWj\n61 5 dl9MDSWqwHjDnToKcsWE1S\n5 10 42104444441001414401221302402201233340311104212022133030","62 abcdefghiz\n2 11011100000100010111110010010110011111001001100011010010001\n\n10 1234567890123456789012345678901234567890\n16 3A0C92075C0DBF3B8ACBC5F96CE3F0AD2\n\n16 3A0C92075C0DBF3B8ACBC5F96CE3F0AD2\n35 333YMHOUE8JPLT7OX6K9FYCQ8A\n\n35 333YMHOUE8JPLT7OX6K9FYCQ8A\n23 946B9AA02MI37E3D3MMJ4G7BL2F05\n\n23 946B9AA02MI37E3D3MMJ4G7BL2F05\n49 1VbDkSIMJL3JjRgAdlUfcaWj\n\n49 1VbDkSIMJL3JjRgAdlUfcaWj\n61 dl9MDSWqwHjDnToKcsWE1S\n\n61 dl9MDSWqwHjDnToKcsWE1S\n5 42104444441001414401221302402201233340311104212022133030\n\n5 42104444441001414401221302402201233340311104212022133030\n10 1234567890123456789012345678901234567890"]],"show_order":[],"formal_statement":null,"simple_statement":null,"has_page_source":false}