405258: GYM101858 J Jaeger Training
Description
To become a Survey Corps people need to first graduate on Training Corps.
It's not an easy task, the outside is full of huge fearless titans, so the Training Corps needs to assert only the best cadets go through.
During one of the exams, $$$n$$$ cadets must traverse a circuit and score some points. The grade the $$$i$$$-th cadet earns is $$$n$$$ minus the number of cadets that finished the circuit before the him and scored at least the same amount of points.
You must calculate the grade each cadet earned during the exam.
InputThe first line of input contains one integer, $$$n$$$ ($$$1 \le n \le 10^5$$$) — the number of cadets doing the exam.
The next $$$n$$$ lines contains, each, one integer $$$s_i$$$ ($$$0 \le s_i \le 10^6$$$) — how many points the $$$i$$$-th cadet earned. The $$$i$$$-th cadet finished the circuit before the $$$j$$$-th cadet, if $$$i < j$$$.
OutputFor each cadet you must print his grade.
ExamplesInput3Output
1
2
3
3Input
3
3
5Output
5
4
3
2
3
5
4
3
2
2