e-olymp
favorite We need a little bit of your help to keep things running, click on this banner to learn more
Competitions

Exponentiation

Inverse

Prime number n is given. The inverse number to i (1i < n) is such number j that i * j = 1 (mod n). Its possible to prove that for each i exists only one inverse.

For all possible values of i find the inverse numbers.

Input

One prime number n (2n106).

Output

Print n - 1 numbers. The i-th printed number should be the inverse to i.

Time limit 4 second
Memory limit 128 MiB
Input example #1
5
Output example #1
1 3 2 4