Time limit
0.5s
Memory limit
512 MB
A permutation contains each integer from 1 through N exactly once. For a value i, define A[i] as the number of elements greater than i that appear before i in the permutation. Given all values A[i], reconstruct the original permutation.
The first line contains the length N of the permutation (1 ≤ N ≤ 100,000). The next N lines contain A[i] for i=1,2,...,N in order, one value per line.
Print the original permutation in order over N lines. The k-th line must contain the k-th element of the permutation.