We need to arrange kids in teams. We begin by placing kids in each team, starting from the first to the team. When we finish with the team, we switch directions and continue, placing kids in each team, from the to the first team, respectively. When we finish with the first team, we switch directions again and continue the process from the second to the team, respectively, and so on until there are no kids left to distribute. For example, if we have three teams, we will place kids in teams in the following order: first team, second team, third team, second team, first team, second team, etc.
If at any point, there are less than kids left to place in the current team, we place all the remaining kids in that team and end the process.
Output the number of kids in each team when the process ends.
Input Specification
The first line of input contains the integers , and from the task.
Output Specification
In a single line, output the number of kids in each of the teams, respectively from the first to the team.
Scoring
In test cases worth a total of points, it will hold .
Sample Input 1
2 1 3
Sample Output 1
2 1
Sample Input 2
3 2 7
Sample Output 2
2 3 2
Sample Input 3
4 5 6
Sample Output 3
5 1 0 0
Comments