Author:  A. Klenin  Time limit:  1 sec  
Input file:  input.txt  Memory limit:  256 Mb  
Output file:  output.txt 
Consider a sequence of numbers a_{1}, …, a_{N}, representing heights. Let's say that element a_{i} has a visibility radius d if a_{i} ≥ a_{j} for all j such that 1 ≤ j ≤ N and i − j < d.
You task is to find maximum d_{i} for every a_{i}.
Input file contains integer N followed by N integers a_{i}.
Output file must contain N integers d_{i} — maximum visibility for every a_{i}. If maximum visibility radius for element a_{i} is unlimited, output d_{i} = 0.
1 ≤ N ≤ 10^{6}, 0 ≤ a_{i} ≤ 10^{9}
No.  Input file (input.txt ) 
Output file (output.txt ) 

1 


2 

