{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eThere are two numbers, \u003ci\u003ea\u003c/i\u003e and \u003ci\u003eb\u003c/i\u003e. It is required to calculate the value \u003ci\u003ea\u003c/i\u003e/\u003ci\u003eb\u003c/i\u003e and write it in the \u003ci\u003ek\u003c/i\u003e-based number system.\u003c/div\u003e\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eThe input consists of several tests (not more than 100) separated by a line break. Each test consists of three integers 1 ≤ \u003ci\u003ea\u003c/i\u003e ≤ 10000, 1 ≤ \u003ci\u003eb\u003c/i\u003e ≤ 10000, 2 ≤ \u003ci\u003ek\u003c/i\u003e ≤ 36. There are two zeros in the last line.\u003c/div\u003e\u003c/div\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eFor each test, output a line containing the representation of the number \u003ci\u003ea\u003c/i\u003e/\u003ci\u003eb\u003c/i\u003e in the \u003ci\u003ek\u003c/i\u003e-based number system. The integer part must be separated from the fractional part by a point. If the number \u003ci\u003ea\u003c/i\u003e/\u003ci\u003eb\u003c/i\u003e is whole, then there should be no point. The output must not contain insignificant zeros. If the fraction \u003ci\u003ea\u003c/i\u003e/\u003ci\u003eb\u003c/i\u003e is periodic, then its period must be given in parentheses.\u003c/div\u003e\u003c/div\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\u003e10 5 2\r\n1 2 8\r\n8780 1 29\r\n2794 6083 23\r\n157 7 19\r\n1 12 10\r\n0 0\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e10\r\n0.4\r\nACM\r\n0.(ACM)\r\n13.(82DAG5)\r\n0.08(3)\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}