SP8985 KOILINE - Line up

Description

N people are lined up in a straight line to enter a concert. Each person in this line knows how many people in front have shorter or same heights. Let's call the sequence representing these numbers S. So in other words, S\[i\] means that there are S\[i\] people in front of the ith person who have shorter or same heights than that of person i. Given the heights of N people and a sequence S, determine the correct order of people lined up. (left is front)

Input Format

The first line of the input is an integer N. (1

Output Format

Determine the correct ordering of people lined up. Total of N lines should be output. The integer on the ith line represents the height of the ith person in the line.