Anjan was feeling low for nearly a couple of months. To improve his condition, he decided to track his mental state using a policy. Based on his activity level and mood, he has assigned a non-negative integer for each day. He calls each values of the satisfaction index (SI) of day .
After generating the satisfaction index value for days, he went to a psychologist to improve his mental condition. The psychologist was pleased to see his data and gave him an exercise to further analyze his situation. Anjan needs to calculate another integer value called improvement index(II) for each of the n days using the following policy:
The II of day is .
For , the II of day is greater than day if the SI of day is strictly greater than
For , if SI of day less than or equal to the SI of day , then the II of day is .
Despite the work being simple, Anjan felt a lot of stress and decided to take a vacation to Rangamati. He assigned you to calculate the values for him.
The first line of input contains an integer (), the number of days Anjan has kept track of his mental states. In the next lines there will be one integer ( ) each, the satisfaction index of day .
Output integers in one line, the improvement index of Anjan based on the data he generated.
3 5 10 9
1 2 1