The first line contains an integer $T$, indicating the number of testcase.
For each testcase, the first line contains a positive integer $n$, indicating the number of stars observed.
From line $2$ to line $n + 1$, each line contains three integers $x, y, c$. Line $i$ describes the information of the stars $i-1$, where $x, y$ are the horizontal and vertical coordinates of the star's position, that is, the coordinates of the star are $(x, y)$; $c$ is for the description of stellar types, $0$ indicates that the stars are B-type stars, $1$ indicates R-type stars, and $2$ indicates G-type stars.
$T\le 10, 3\le n\le 3\times 10^3,|x|,|y|\le 10^9,0\le c\le 2$
It is guaranteed that there exists a Constellation Ao, and any two stars will not be in the same position.