LearnPy Hub
← Arena
IntermediateRating 1300

Stock Price Span

The span of a day is how many consecutive days, ending today, had a price ≤ today's price. Print the span of every day.

Input

n, then n prices.

Output

n integers.

Sample 1

Input
7
100 80 60 70 60 75 85
Output
1 1 1 2 1 4 6

Sample 2

Input
1
5
Output
1
solution.py
Output appears here
Stock Price Span · Python Arena problem · LearnPy Hub