Election

No attempts yetTime limit1sMemory limit256 MB

Problem

In ancient Rome an election was decided by a game called Throw the Coin. Each player brought one coin, any coin, as long as it was perfectly round and had an integer radius. A player threw the coin so that its center landed on integer coordinates of a coordinate system, and the area covered by the coin was marked on the ground. Two players became allies when the areas covered by their coins overlapped. The player with the most allies won the election. (Anyone who studies Roman history will point out that the games were usually fixed and the player who brought the fiercest looking cat won. This problem is about the coins.)

Two coins with centers (Xi,Yi)(X_i, Y_i) and (Xj,Yj)(X_j, Y_j) and radii RiR_i and RjR_j overlap when

(XiXj)2+(YiYj)2<(Ri+Rj)2.(X_i - X_j)^2 + (Y_i - Y_j)^2 < (R_i + R_j)^2.

A coin that lies completely inside another coin overlaps it. The input guarantees that no two coins touch in exactly one point, so (XiXj)2+(YiYj)2(Ri+Rj)2(X_i - X_j)^2 + (Y_i - Y_j)^2 \ne (R_i + R_j)^2 holds for every pair.

NN players have lined up to play. Report who won each game.

Input

The first line has one integer TT, the number of test cases.

Each test case begins with a line holding one integer NN, the number of players. Each of the next NN lines holds a player's name and three integers XX, YY and RR: the x coordinate of the throw, the y coordinate of the throw, and the radius of the coin.

  • 1T201 \le T \le 20
  • 2N1002 \le N \le 100
  • 100X,Y100-100 \le X, Y \le 100
  • 1R1001 \le R \le 100
  • each name is 2 to 255 lowercase letters from a to z
  • one game may hold two players with the same name, and every line is a separate player

Output

For each test case print one line with the name of the player who has the most allies. If two or more players are tied for the most allies, print TIE instead, and print TIE even when the tied players have the same name.