Growling Gears

No attempts yetTime limit1sMemory limit256 MB

Problem

The Best Acceleration Production Company builds engines with several gears. The performance of an engine in a given gear is measured by the amount of torque it produces, and that amount is not constant. Torque depends on the RPM of the engine, and the relationship is described by a torque-RPM curve.

In the latest line of engines, the torque-RPM curve of every gear is a parabola of the form T=aR2+bR+cT = -aR^2 + bR + c, where RR is the RPM of the engine and TT is the resulting torque. RR is a real number.

Given the parabolas that describe all gears in an engine, determine the gear in which the highest torque is produced. The first gear is gear 1, the second gear is gear 2, and so on. Exactly one gear produces the highest torque. In every test case that gear's maximum torque is at least 1 higher than the maximum torque of every other gear.

Input

The first line contains the number of test cases, which is at least 1 and at most 100. Each test case is given in the following format.

  • One line with a single integer nn (1n101 \le n \le 10): the number of gears in the engine.
  • nn lines, each with three space-separated integers aa, bb and cc (1a,b,c100001 \le a, b, c \le 10\,000): the parameters of the parabola T=aR2+bR+cT = -aR^2 + bR + c that describes the torque-RPM curve of that gear.

Output

For each test case, print one line with a single integer: the gear in which the maximum torque is generated.