I work at NASA outer space rescue team which needs much courage and patient. In daily life, I always receive a lot of mission, and I must complete it right now. Now I need to build a tunnel to connect two spaceships. In simplicity, let us use a straight line in three dimensional coordinate system to indicate a single spaceship. In order to minimizing the risks, I want to build a tunnel with shortest length.
输入描述:
The first line contains an integer T (1 ≤ T ≤ 100000), indicating the number of test cases.
Each case contains two line. The first line contains six integers x1, y1, z1, x2, y2, z2 (-100 ≤ x1,y1,z1,x2,y2,z2 ≤ 100), correspondingly indicating two endpoints of the first spaceship. The second line contains six integers in the same format, describing the second spaceship.
输出描述:
For each test cases, output one line indicating the squared length of shortest tunnel. Keep 30 decimal places.
示例1
输入
复制
2
0 0 0 1 1 1
1 1 1 2 2 2
1 0 0 0 1 0
1 1 0 2 2 0
输出
复制
0.000000000000000000000000000000
0.500000000000000000000000000000
说明
Please round to 30 decimal places, without extra spaces.