In the event of technical difficulties with Szkopuł, please contact us via email at email@example.com.
If you are familiar with IRC chat, the support team is also reachable on PIRC network (
#szkopul channel. If you are not, just use email.
Please do not ask us things like "how to solve task XYZ?".
Please remember that the support team has to sleep sometimes or go to work in real life.
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.
Write a program that
The only line of input contains three positive integers , and (, , ).
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.
For the input data:
3 4 3
the correct result is:
1 1 3
Task author: Jakub Pawlewicz.