题目描述
Problem Description
DISCO presents Discovery Channel Programming Contest 2016 had $ N $ participants. The leaderboard consists of $ N $ rows, where the $ i $-th row displays the seat number $ Id_i $ of the person who ranked $ i $-th. That is, the ranks taken by the $ N $ participants are all different.
By the way, the prize money for DISCO presents Discovery Channel Programming Contest 2016 is as follows:
- $ 1 $st place: $ 100,000 $ yen
- $ 2 $nd place: $ 50,000 $ yen
- $ 3 $rd place: $ 30,000 $ yen
- $ 4 $th place: $ 20,000 $ yen
- $ 5 $th place: $ 10,000 $ yen
- Others: $ 0 $ yen
You have become curious about the amount of prize money each participant of DISCO presents Discovery Channel Programming Contest 2016 has won.
Input Format
The input is given from the standard input in the following format:
$ N $ $ Id_1 $ $ Id_2 $ $ . $ $ . $ $ . $ $ Id_N $
- The first line contains an integer $N\ (5≦N≦100)$ representing the number of participants in DISCO presents Discovery Channel Programming Contest 2016.
- The following $ N $ lines contain an integer $Id_i\ (1≦Id_i≦N)$ representing the seat number of the person who ranked $ i $-th.
- There are no duplicate seat numbers.
Output Format
The output consists of $ N $ lines. The $ i $-th line should output the amount of prize money won by the person with seat number $ i $. Do not forget the newline at the end of the output.
Sample Input and Output
Sample Input #1
5
1
2
3
4
5
Sample Output #1
100000
50000
30000
20000
10000
Sample Input #2
8
8
7
6
5
4
3
2
1
Sample Output #2
0
0
0
10000
20000
30000
50000
100000
Sample Input #3
7
1
5
4
2
7
6
3
Sample Output #3
100000
20000
0
30000
50000
0
10000
Notes/Hints
Sample Explanation 1
- In this case, the output is made over $ 5 $ lines.
- The person with seat number $ 1 $ ranked $ 1 $st and won $ 100,000 $ yen.
- The person with seat number $ 2 $ ranked $ 2 $nd and won $ 50,000 $ yen.
- The person with seat number $ 3 $ ranked $ 3 $rd and won $ 30,000 $ yen.
- The person with seat number $ 4 $ ranked $ 4 $th and won $ 20,000 $ yen.
- The person with seat number $ 5 $ ranked $ 5 $th and won $ 10,000 $ yen.
Sample Explanation 2
- In this case, the output is made over $ 8 $ lines.
- The person with seat number $ 1 $ ranked $ 8 $th and won $ 0 $ yen.
- The person with seat number $ 2 $ ranked $ 7 $th and won $ 0 $ yen.
- The person with seat number $ 3 $ ranked $ 6 $th and won $ 0 $ yen.
- The person with seat number $ 4 $ ranked $ 5 $th and won $ 10,000 $ yen.
- The person with seat number $ 5 $ ranked $ 4 $th and won $ 20,000 $ yen.
- The person with seat number $ 6 $ ranked $ 3 $rd and won $ 30,000 $ yen.
- The person with seat number $ 7 $ ranked $ 2 $nd and won $ 50,000 $ yen.
- The person with seat number $ 8 $ ranked $ 1 $st and won $ 100,000 $ yen.
Sample Explanation 3
- In this case, the output is made over $ 7 $ lines.
- The person with seat number $ 1 $ ranked $ 1 $st and won $ 100,000 $ yen.
- The person with seat number $ 2 $ ranked $ 4 $th and won $ 20,000 $ yen.
- The person with seat number $ 3 $ ranked $ 7 $th and won $ 0 $ yen.
- The person with seat number $ 4 $ ranked $ 3 $rd and won $ 30,000 $ yen.
- The person with seat number $ 5 $ ranked $ 2 $nd and won $ 50,000 $ yen.
- The person with seat number $ 6 $ ranked $ 6 $th and won $ 0 $ yen.
- The person with seat number $ 7 $ ranked $ 5 $th and won $ 10,000 $ yen.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分