Question
Clockwise Next Peak

You are given n signal strengths arranged on a circle.

For every position i, move clockwise and find the first position whose value is strictly greater than a_i. Output the number of steps needed to reach it.

If no greater value exists after making at most one full trip around the circle, output 0 for that position.

Input

The first line contains KaTeX can only parse string typed expression.
The second line contains KaTeX can only parse string typed expression integers.

Output

Print KaTeX can only parse string typed expression integers. The KaTeX can only parse string typed expression-th integer is the clockwise distance to the first strictly greater value, or 0 if none exists.

Example
Input:
5

3 1 2 4 2
Output:
3 1 1 0 1

Online