Most(May be all) of the people here at NIT kurukshetra don't like to make ED sheets. Seeing this our new ED teacher, Mr Roy, decided to add some twist to the course !!
Now, He Give you a big blank ED sheet of black color and list of N circles where each circles is described as the center of co-ordinate and its radius. Now, He asked you to draw all circles one by one in the order of non decreasing radii and if a circles is drawn on black color it's color is white and if drawn on white color, its color is black ! He did not ask you to submit the ED sheet, but only tell the total area of white at the end !!
You being a brilliant programmer, can tell the total area of white at the end without making sheets but only through a program.
Input: First line of input contains a line t which is the number of test cases, then t test cases follow where each test case can be described as below: First line of each test case contains an integer N denoting the number of circles, then N lines follow each line containing three integers xi,yi,ri where xi and yi are co-ordinates of center and ri is the radius of circle !
Output: Output a double with exactly 6 digits after decimal which the total area of white on the sheet !
PS: Assume that ED sheet is large enough to accommodate all circles and all the circles are non intersecting !! Though one can be inside other completely.
**Contraints:**
0<t<=10
0<N<=1000
-100000<=xi<yi<=1000000
0<ri<=1000
This Image shows how ED sheet will look like for sample input data