a
n = X*a
n-1 + Y and Y mod (X-1) = 0.
Your task is to calculate the smallest positive integer k that a
k mod a
0 = 0.
Each line will contain only three integers X, Y, a
0 ( 1 < X < 2
31, 0 <= Y < 2
63, 0 < a
0 < 2
31).
For each case, output the answer in one line, if there is no such k, output "Impossible!".