There are $N$ towers arranged from left to right, numbered $1$ through $N$. Their heights are all different. Each tower sends a horizontal laser beam to the left from its top. A beam is received by the first tower it encounters; it does not continue past that tower.
Find the receiving tower for every tower's beam.
For example, consider the five towers with heights $6,9,5,7,4$. The fifth tower’s beam reaches the fourth tower, whose height is $7$. The fourth and third towers’ beams both reach the second tower, whose height is $9$. No tower receives the beams from the first and second towers.
Input
The first line contains $N$ ($1\le N\le500000$). The second line contains the $N$ heights in order. Every height is an integer between $1$ and $100000000$, inclusive.
Output
Print $N$ integers in tower order: the receiving tower's number, or $0$ if no tower receives that beam.
Examples
Input 1
5 6 9 5 7 4
Output 1
0 0 2 2 4