题目描述
Walter white wants to buy a car, he does not care much about the type of car (sedan/hatchback/SUV) nor the power that the car has,
all he cares about is how much the car will cost him, since he has loads of money , he wants to buy the most expensive car available in the market, but there is a catch!
The tax percentages for each car vary and Walt wants to buy the most expensive car (including the tax costs), since there is a large selection of cars to choose from and he is busy 'cooking' for most of the time, he knocks on your door (because he is the one who knocks) one fine day and asks you to give him an efficient solution for his problem.
If two cars have the same cost after adding the tax costs, Walt wants the car which has higher base price.
Note: There is no case where the base price and interest rates of any two cars are the same
Input
The first line of the input contains an integer T denoting the number of test cases.
Each line contains :N denoting the number of cars
The next N lines contain
string S denoting the car name
The cost of the car C
The tax percentage to be paid for that particular car i
Output
For each test case, output a single line containing the name of the car that you have to suggest for walter to buy
Constraints
1 ≤ T ≤ 1000
1 ≤ N ≤ 100
1 ≤ S ≤ 20
100 ≤ C ≤ 1000000
0 ≤ i ≤ 100
Example
Input:
2
3
Ferrari $100000 20%
Porsche $200000 10%
Lamborghini $300000 10%
2
BMW $20000 50%
Benz $15000 100%
Output:
Lamborghini
BMW
Explanation
Example case 1. Lamborghini is the costliest car among the given cars
Example case 2. The two cars turn out to be the same cost after taxes, but the base price of BMW is more
输入格式
见题面
输出格式
见题面