Bytie likes playing with his dice.
His dice are not really typical: each of them has faces with the respective faces
containing , , ..., pips.
Bytie considers different arrangements of the dice in which the numbers of pips on the top
of the dice form a sequence that is non-decreasing.
Among two such arrangements, the one that has a smaller number of pips
at the leftmost position where they differ is considered worse.
Bytie is now enumerating all such arrangements starting from the worst arrangement
with 1 pip on the top faces of all the dice.
He is willing to reach the -th arrangement in this sequence.
Help him check if he made it correctly.
Task
Write a program that
reads the numbers , and
writes the -th sequence in the desired order.
Input
The only line of input contains three positive integers
, and
(, , ).
Output
Your program should output positive integers: the numbers of pipes
on the top faces of the dice in the requested -th arrangement.
You may assume that the input is constructed in such way that this requested
arrangement exists.
Example
For the input data:
3 4 3
the correct result is:
1 1 3
Task author: Jakub Pawlewicz.
Kontakt
W razie problemów technicznych ze Szkopułem, prosimy o kontakt mailowy pod adresem szkopul@fri.edu.pl.
Jeśli chciałbyś porozmawiać o zadaniach, rozwiązaniach lub problemach technicznych, odwiedź nasze serwery na Discordzie. Są one moderowane przez społeczność, ale członkowie zespołu wsparcia również aktywnie się tam udzielają.