You are playing a mathematical game that involves making a sequence of wagers using points. The rules of the game are as follows:
Moves are made in sequence. Each sequence starts with a minimum wager of points.
If your move is successful, the sequence ends, and you may start a new sequence with the minimum wager.
If your move is not successful, you may try again, placing another wager. The goal is for a successful wager to recover all previous losses in the current sequence and yield an additional profit compared to winning earlier in the sequence.
For each round, a successful move returns you times the number of points you wager (so you get back your wager plus q-1 times the wager as extra points). However, there are constraints: every wager must be between and points, inclusive.
Your task is to construct the optimal sequence of wagers under the following conditions:
Each wager, if successful, must cover all previous accumulated losses and provide at least as much profit (after subtracting these losses) as would have been gained by winning on the previous move.
The sequence should be as long as possible.
If there are multiple sequences of maximum length, choose the one with the largest minimum increment of profit from one successful wager to the next. That is, for w_i being the net profit after a successful -th wager (subtracting previous losses), maximize the minimum of w_{i+1} - w_i.
If there is still a tie, maximize the profit from the first wager, then the second, and so on.
The input consists of a single line with three positive integers: , , and (1 \leq min \leq max \leq 10^{18}, 2 \leq q \leq 1000), where and are the minimum and maximum allowed wager in the game, and is the success multiplier.
Output two lines. The first line should be the length of the optimal sequence of wagers. The second line should contain the wager amounts in sequence.
Example 1