Histogram Sequence 3
면접 대비시간 제한2초메모리 제한1024 MB
히스토그램에서 만들어진 높이 수열이 주어지면 이를 만든 히스토그램 수열 a1, a2, ..., an을 복원한다.
문제
Consider the histogram composed of squares with side lengths . Let's call the sequence the histogram sequence of this histogram.
Let's consider the height of each column in this histogram. The first columns will each have height , the following columns will each have height , ... and the last columns will each have height . Now, let us define the height sequence where is the height of the -th column.
For example, the histogram with as its histogram sequence has as its height sequence.

Write a program to find the histogram sequence given the height sequence.
입력
The first line contains a single integer representing the length of the height sequence is given.
The second line of the input contains integers, the height sequence. Specifically, the -th integer in the line is .
The input is designed such that the provided height sequence corresponds to a valid histogram sequence.
출력
Output integers on a single line, where is the histogram sequence corresponding to the given height sequence. If there are multiple answers, any one of them will be accepted.