Mad Scientist

Time limit1sMemory limit128 MB

Problem

A mad scientist performed a series of experiments, each consisting of $n$ phases. During each phase a measurement was taken, yielding a positive integer of magnitude at most $k$. Every experiment was designed so that its measurements were monotonically non-decreasing: each measurement is at least as large as all measurements that precede it. For example, one experiment with $n = 13$ and $k = 6$ produced the following measurements:

1, 1, 2, 2, 2, 2, 2, 4, 5, 5, 5, 5, 6

Because $n$ was always larger than $k$, the measurement sequence typically contained many repeated values. Being mad, the scientist recorded the data in an unusual way. Instead of storing all $n$ measurements, the scientist stored a sequence $P$ of $k$ values where, for $1 \le j \le k$, $P(j)$ is the number of phases whose measurement is at most $j$. For the experiment above, the measurements were recorded as the $P$-sequence:

2, 7, 7, 8, 12, 13

because two measurements are $\le 1$, seven are $\le 2$, seven are $\le 3$, and so on.

The scientist eventually went insane, leaving behind a notebook full of these $P$-sequences. Write a program that recovers the original measurements from each $P$-sequence.

Input

The input contains several $P$-sequences, one per line. Each line begins with the integer $k$, the length of the $P$-sequence, followed by the $k$ values of the sequence. The input ends with a line containing a single $0$. Every original experiment satisfied $1 \le k < n \le 26$.

Output

For each $P$-sequence, print one line containing the recovered measurements of the original experiment, separated by single spaces.