Under construction

Still being built. Things may change

Timovi

Time limit1sMemory limit64 MB

Summary
Kids are dealt into N teams in a bouncing 1..N..1 order, K per visit, until fewer than K remain; report each team's final count.
Level

Medium4 of 10

Topics
Math, Simulation, Implementation, Array
Solved
No attempts yet

Problem

You split MM kids into NN teams. First you put KK kids into the first team, then KK kids into the second team, and so on up to the NNth team. After the NNth team you turn around and keep putting KK kids into each team, going from the (N−1)(N-1)th team down to the first team. After the first team you turn around again, continue from the second team up to the NNth team, and repeat until no kids are left to hand out.

For example, with three teams the kids go into the teams in this order: 1, 2, 3, 2, 1, 2, 3, and so on.

If fewer than KK kids are left when a team comes up, that team takes every remaining kid and the process ends.

Report how many kids each team holds once the process ends.

Input

The first line contains the integers NN, KK and MM (2≤N≤200 0002 \le N \le 200\,000, 1≤K≤M≤2 000 000 0001 \le K \le M \le 2\,000\,000\,000).

Output

Print the number of kids in each of the NN teams on a single line, from the first team to the NNth team, separated by single spaces.

Examples3

  1. Example 1

    Input
    2 1 3
    
    Expected output
    2 1
    
  2. Example 2

    Input
    3 2 7
    
    Expected output
    2 3 2
    
  3. Example 3

    Input
    4 5 6
    
    Expected output
    5 1 0 0