#D12271. GPA JANKEN
GPA JANKEN
GPA JANKEN
Problem
GPA is an abbreviation for "Galaxy Point of Aizu" and takes real numbers from 0 to 4. GPA rock-paper-scissors is a game played by two people. After each player gives a signal of "rock-paper-scissors, pon (hoi)" to each other's favorite move, goo, choki, or par, the person with the higher GPA becomes the winner, and the person with the lower GPA becomes the loser. If they are the same, it will be a draw.
Since the GPA data of N people is given, output the points won in each round-robin battle. However, the points won will be 3 when winning, 1 when drawing, and 0 when losing.
Round-robin is a system in which all participants play against participants other than themselves exactly once.
Constraints
The input satisfies the following conditions.
- 2 ≤ N ≤ 105
- N is an integer
- 0.000 ≤ ai ≤ 4.000 (1 ≤ i ≤ N)
- ai is a real number (1 ≤ i ≤ N)
- Each GPA is given up to 3 decimal places
Input
The input is given in the following format.
N a1 a2 ... aN
The first line is given the number of people N to play GPA rock-paper-scissors. The following N lines are given the data ai of the i-th person's GPA in one line.
Output
Output the points of the i-th person on the i-line on one line. (1 ≤ i ≤ N)
Examples
Input
3 1.000 3.000 3.000
Output
0 4 4
Input
3 1.000 2.000 3.000
Output
0 3 6
inputFormat
outputFormat
output the points won in each round-robin battle. However, the points won will be 3 when winning, 1 when drawing, and 0 when losing.
Round-robin is a system in which all participants play against participants other than themselves exactly once.
Constraints
The input satisfies the following conditions.
- 2 ≤ N ≤ 105
- N is an integer
- 0.000 ≤ ai ≤ 4.000 (1 ≤ i ≤ N)
- ai is a real number (1 ≤ i ≤ N)
- Each GPA is given up to 3 decimal places
Input
The input is given in the following format.
N a1 a2 ... aN
The first line is given the number of people N to play GPA rock-paper-scissors. The following N lines are given the data ai of the i-th person's GPA in one line.
Output
Output the points of the i-th person on the i-line on one line. (1 ≤ i ≤ N)
Examples
Input
3 1.000 3.000 3.000
Output
0 4 4
Input
3 1.000 2.000 3.000
Output
0 3 6
样例
3
1.000
2.000
3.000
0
3
6
</p>