spoj#DISCRT. Discrete Roots

Discrete Roots

In this problem, we try to compute discrete kth root modulo n; given n, k, a; find all the solutions for x such that xk = a (mod n) and x is coprime with n.

Input

For each input file, there are 3 space seperated integers n, k, a.

n = pe for some odd prime p, integer e > 0; 0 <= a < n <= 109, 0 <= k < phi(n), where phi is Euler's totient function; the numbers n, a are coprimes.

Output

The first line of the output contains a single integer m, the number of solutions in the range [0, n - 1] that are coprimes with n, followed by m lines that contain the m solutions in ascending order. It is guranteed that m <= 104.

Example

Input:
5 1 3

Output:

</p>
1
3