Little Y finds there is a very interesting formula in mathematics:
XY mod Z = K
Given X, Y, Z, we all know how to figure out K fast. However, given X, Z, K, could you figure out Y fast?
Input data consists of no more than 20 test cases. For each test case, there would be only one line containing 3 integers
K (0 ≤
K ≤ 10
Input file ends with 3 zeros separated by spaces.
For each test case output one line. Write "No Solution" (without es) if you cannot find a feasible
Y (0 ≤
YZ). Otherwise output the minimum
Y you find.