TopCoder

$\huge 南ことり$

100.0% (10/10)

92.9% (13/14)

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

Jiang
LoliFarmer
Doraemon

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)
0 1000 65536
1 1000 65536
2 1000 65536
3 1000 65536
4 1000 65536
5 1000 65536
6 1000 65536
7 1000 65536
8 1000 65536
9 1000 65536