As is classical in riddles and puzzles, individuals have been lined up and
they are all of different heights. They are all facing the same
way, so the first person sees no one else, the second sees only
the first person and so on. Rather than having differently
coloured hats or some such they can simply tell how tall
everyone in front of them is. You walk down the line and ask
each of them how many people in front of them are taller than
themselves. Given this information, can you figure out what the
internal height order is?
Input
The input starts with a single line containing a single
integer , the number of individuals. Next there is a single
line with integers
.
They satisfy since the -th person only sees other people.
Output
Print the numbers on a single line. Print the numbers in such an
order that if the -th
number is then the
-th person is the
-th shortest. For
example if the tallest person comes first, then the shortest,
with the last being of a height between the other two, you
should print 3 1 2.
Sample Input 1 |
Sample Output 1 |
7
0 1 0 2 0 2 1
|
3 1 5 2 7 4 6
|