A tiny planet has the shape of a convex polyhedron. The Little Prince wants to travel from the spot where his rocket landed to the rose. He always moves only along the surface of the planet; he can neither pass through its interior nor leap through the air.
The planet is a convex polyhedron and every face is a convex polygon. Given the landing point and the rose, both lying on the surface, find the length of the shortest path between them that stays on the surface.
The first line contains the number of test cases d (1≤d≤150).
Each test case is given as follows. The first line contains the number of faces of the planet n (4≤n≤15). Each of the next n lines describes one face. A face description starts with the number of its vertices k (3≤k≤n−1), followed by the coordinates x y z of its k vertices listed in order around the boundary of the face. No two faces lie in the same plane.
The last line of each test case contains the coordinates of the landing point xa ya za and of the rose xb yb zb. Both points lie on the surface of the planet. All coordinates are integers between −1000 and 1000.
For each test case, print on its own line the shortest surface distance between the landing point and the rose, rounded to exactly two decimal places.