Sangdeok's final exam is almost here. The algorithms section he takes has N students. Algorithms is graded on a curve, so no two students share a rank, and each student's satisfaction depends on the midterm rank and the final rank. Rank 1 is the highest rank. For the student who placed i-th on the midterm, the satisfaction Ai is defined as follows.
Number the students by midterm rank. The student who placed i-th on the midterm is student i. Suppose five students got the results below.
| Midterm rank | Final rank | |
|---|---|---|
| Student 1 | 1st | 5th |
| Student 2 | 2nd | 4th |
| Student 3 | 3rd | 3rd |
| Student 4 | 4th | 2nd |
| Student 5 | 5th | 1st |
For student 5, four students placed higher on the midterm and lower on the final, and no student placed lower on the midterm and higher on the final, so the satisfaction is 4. For student 1, no student meets the first condition and four students meet the second one, so the satisfaction is -4.
Write a program that prints the satisfaction of every student in the section.
The first line contains the number of students N (1≤N≤100000). The second line contains N integers: the students who placed 1st through N-th on the final, each written as that student's midterm rank, in that order.
Print the final exam satisfaction of each student, one per line, ordered by midterm rank from 1st to N-th.