## GUPTA MECHANICAL

IN THIS WEBSITE I CAN TELL ALL ABOUT TECH. TIPS AND TRICKS APP REVIEWS AND UNBOXINGS ALSO TECH. NEWS .............

# [Solution] Narrow road Codeforces Solution VK Cup

test time limit
2 seconds
memory limit per test
512 megabytes
input
standard input
conclusion
standard output

Column from$n$scooter rides on a narrow one-way road to point B. The scooters are numbered from$1$to$n$For every scooter$i$it is known that the current distance from it to point B is equal to${a}_{i}$meters. Wherein${a}_{1}<{a}_{2}<\dots <{a}_{n}$in particular scooter$1$is closest to point B, and the scooter$n$ - farthest.

Scooter with number$i$moves towards point B with a speed$i$meters per second (that is, the closer the scooter in the convoy is to point B, the slower it goes). Since the road is narrow, the scooters cannot overtake each other. Moreover, neighboring scooters in a column must keep a distance of at least$1$meter. Therefore, when a faster scooter catches up with a slower one, the faster one has to go further at the speed of the slower one, and at a distance of$1$meter from him.

Determine how far each scooter will be to point B in exactly one second.

Input data

The first line contains one integer$n$ ($1\le n\le 100$) is the number of scooters in the column.

AT$i$th of the following$n$rows given one integer${a}_{i}$($1\le {a}_{i}\le 1000$${a}_{1}<{a}_{2}<\dots <{a}_{n}$) — current distance from the scooter$i$to point B in meters.

Output

Bring out$n$integers — distances from scooters$1,2,\dots ,n$to point B in meters in one second.

Note

In the first test, the scooters do not interfere with each other so far, so each scooter$i$advances on$i$meters towards point B.

In the second test, the scooters have already lined up in a column at a distance$1$meter apart and forced to ride at the speed of the slowest scooter with the number$1$.