eolymp
bolt
Try our new interface for solving problems
Problems

Restore the permutation

Restore the permutation

The permutation p is given. Let fii be the number of such j that pj > pi and j < i. The array fi is called an inversion table for permutation p. Given the inversion table, restore the permutation.

Input

First line contains the order n (0 < n2000) of permutation p. Second line contains the table of inversions fi.

Output

Print the permutation p.

Time limit 1 second
Memory limit 128 MiB
Input example #1
3
0 0 2
Output example #1
2 3 1