Given an array of n integers , 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 β€ ).
The next line contains n space-separated integers ().
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.