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) and (Xj,Yj) and radii Ri and Rj overlap when
(Xi−Xj)2+(Yi−Yj)2<(Ri+Rj)2.
A coin that lies completely inside another coin overlaps it. The input guarantees that no two coins touch in exactly one point, so (Xi−Xj)2+(Yi−Yj)2=(Ri+Rj)2 holds for every pair.
N players have lined up to play. Report who won each game.
The first line has one integer T, the number of test cases.
Each test case begins with a line holding one integer N, the number of players. Each of the next N lines holds a player's name and three integers X, Y and R: the x coordinate of the throw, the y coordinate of the throw, and the radius of the coin.
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.