A city skyline is given as a row of n buildings, listed from west to east, each with a positive integer height. For every building, find the nearest building to its east (to the right in the list) that is strictly taller, and report the distance to it, measured in number of buildings (so the immediate next building, if taller, is distance 1). If no taller building exists to the east, report 0 for that building.
Input format
Line 1: an integer n.
Line 2: n space-separated integers, the building heights from west to east.
Output format
n space-separated integers on one line: the distance to the next strictly taller building for each building, in the same west-to-east order.
Constraints
- 1 ≤ n ≤ 100000
- 1 ≤ height ≤ 1000000000