A simple problem

Time Limit: 1000 ms

Memory Limit: 65535 ms

Description

The  Description is very simple.There are n ( n < 100 ) convex polygon
,please tell  me the intersection area of n convex polygon.Each convex polygon at most  have  10 points.

Input

There are multiple test cases.The first line contain a integer t( t < = 10 ), indicate t cases.For each case,the first line contain a integer n,indicate n convex polygon,then next n lines contain the information of the n convex polygon.Each line contain a integer m,indicate the num of point of the convex polygon. Then give you m points by anticlockwise.

Output

For each case,print the intersection area of n convex polygon.( accurate up to 1 decimal place)

Sample Input

1
2
3 0.0 0.0 2.0 0.0 1.0 2.0
3 1.0 0.0 3.0 0.0 2.0 2.0


Sample Output

0.5

None