On a plane, you are given superpolygons (1 \le N \le 30), which do not intersect themselves or each other. Each superpolygon is specified by the coordinates of its K_i vertices (3 \le K_i \le 30, 1 \le i \le N), listed in counterclockwise order. All coordinates are integers in the range to . You must connect these superpolygons with segments such that:
Each segment connects exactly two superpolygons.
The total length of all segments is minimized.
Additionally, between any two superpolygons, there must exist a path (a sequence of some segments and parts of the superpolygon boundaries).
The first line contains the integer . Each of the next lines contains the integer K_i followed by K_i pairs of integers representing the coordinates of the vertices.
Output a single line with the total length of the resulting segments, rounded to three decimal places.
Example 1