402372: GYM100739 F What were those numbers?

Memory Limit:64 MB Time Limit:0 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

F. What were those numbers?time limit per test0.25 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard output

Informikas likes to play a simple game with his friends. First he takes a list of numbers from 1 to N. Later he takes some of those numbers and calculates the average of them. When done, Informikas writes down number N and the average value as a fraction P / Q on a piece of paper.

The next part of the game is easy one. Informikas puts the piece of paper with values N and P / Q in a drawer and doesn't look at it for a couple of days. During this time he usually eats three times a day, solves couple or more programming problems and does other things.

Then there comes the tricky part. After some time, when Informikas is completely sure that he has no memory of the first step of the game, he takes out the piece of paper, looks at the values of N and P / Q and tries to come up with numbers from interval [1;N] so that the average of those numbers would be equal to P / Q. However, he many times fails figuring out those numbers and he ends up wondering if he might have made a mistake in the first step and there are no solutions at all.

Informikas would like to have a program which would find the solution in case he is not able to do that himself. Could you help him?

Input

The first line of input consist of three integer values N, P and Q (1 ≤ N ≤ 105, 1 ≤ P ≤ 1010, 1 ≤ Q ≤ 105). It is guaranteed that the fraction can't be simplified (i.e. the greatest common divisor GCD(P, Q) = 1).

Output

Output either a set of integers from the range [1;N] having an average value of P / Q or write "IMPOSSIBLE" if there is no way to make this kind of set. If there are multiple solutions, output any of them.

ExamplesInput
1 1 1
Output
1 
Input
2 3 2
Output
1 2 
Input
3 7 3
Output
IMPOSSIBLE

加入题单

算法标签: