Given an array of n integers a1,a2,...,an, you are asked to find the closest smaller value to the left of each element.
Input
The first line of the input contains a single integer n (1 ≤ n ≤ 106).
The next line contains n space-separated integers a1,a2,...,an (−109<ai<109).
Output
The program should print n space-separated integers - the indices of the closest smaller value for each element in the given array. If such an element does not exist, the program should print 0.