Chords
Consider a circle. There are 2N different points marked on it and numbered with integer numbers in range from 1 to N so that each number from the interval has two points corresponding to it.
Points with the same numbers are connected by segments. Thus we’ve got N chords. Futhermore, the chords are numbered as well: the chord number "i" connects the two different points with number "i". Apparently some of the chords may intersect. Now it would be nice to find out for each single chord the number of chords it intersects.
Input
In the first line of the input file there is a single integer number N (1 ≤ N ≤ 10^5). In the next line there are 2N integers in range from 1 to N - the numbers assigned to the points in the order of traversal. Each number is written exactly twice. All the numbers in the line are separated with spaces.
Output
The output file is supposed to contain exactly N lines: on the i-th line write the number of chords that i-th chord intersects.