TopCoder

Thumb output jddoia
$\huge 南ことり$
今天也要輸贏!?

User's AC Ratio

83.3% (15/18)

Submission's AC Ratio

31.0% (18/58)

Tags

Description

"slim" is a adjective means VERY THIN,or in chinese is "苗條".

Now a slim man called "苗條人" wants to hold a game named "slim game" or called "苗條大賽".
And ten of the most "苗條" contestants will get the cool name like "SLIM KING","SLIM QUEEN","SLIM JACK"...etc.

Now you have to choose 10 contestants who have the maximum BMI!

Input Format

First line has a integer n, means the number of contestants. n is equal or less than 10000.
each of next n lines,
there is a name of the contestant(the length is equal less than 30)
a integer means the weight(kg) of the contestant(<=1000)
a integer means the height(cm) of the contestant(<=1000)

Output Format

You have to output the names of 10 contestants who have the maximum BMI with decreasing BMI!
If n is less than 10, please output all the contests' name with decreasing BMI.

Sample Input

3
Jiang 80 170
LoliFarmer 50 145
Doraemon 1000 1000

Sample Output

Jiang
LoliFarmer
Doraemon

Hints

Problem Source

原TIOJ1583

Subtasks

For Testdata: 0 ~ 0, Score: 10
For Testdata: 1 ~ 1, Score: 10
For Testdata: 2 ~ 2, Score: 10
For Testdata: 3 ~ 3, Score: 10
For Testdata: 4 ~ 4, Score: 10
For Testdata: 5 ~ 5, Score: 10
For Testdata: 6 ~ 6, Score: 10
For Testdata: 7 ~ 7, Score: 10
For Testdata: 8 ~ 8, Score: 10
For Testdata: 9 ~ 9, Score: 10
No. Time Limit (ms) Memory Limit (KiB) Output Limit (KiB)
0 1000 65536 262144
1 1000 65536 262144
2 1000 65536 262144
3 1000 65536 262144
4 1000 65536 262144
5 1000 65536 262144
6 1000 65536 262144
7 1000 65536 262144
8 1000 65536 262144
9 1000 65536 262144