cho.sh
Notes
Loading...

Line Up

Time limit

2s

Memory limit

128 MB

Problem

N people stand in one line every morning. Their heights are all distinct and are exactly the integers from 1 to N.

Each person remembers only how many taller people were standing to their left. For heights 1 through N, you are given those remembered counts in order.

Find an order of the people that matches all of the given information.

Input

The first line contains the number of people N. N is a positive integer not greater than 10.

The second line contains N integers. The h-th integer is the number of people taller than h who stood to the left of the person with height h. This value is between 0 and N-h, inclusive.

Output

Print one line containing the heights of the people in order, separated by spaces.