Given the lengths of the edges of a tetrahedron
calculate the radius of a sphere inscribed in that tetrahedron
(i.e. a sphere tangent to all the faces).

Input

An integer t, 1 ≤ t ≤ 30, denoting the number of test cases, followed by t lines, each containing 6 integers describing the lengths of the edges of a tetrahedron
separated by single spaces. The edges are not longer than 1000 and
for the tetrahedron WXYZ, the order of the edges is: WX, WY, WZ, XY, XZ, YZ.

Output

t lines, each consisting of a real number given with four digits decimal precision
equal to the radius of a sphere inscribed in the given tetrahedron.

Example


Input:
2
1 1 1 1 1 1
1000 999 998 5 5 6

Output:
0.2041
1.4189
# tetra.py

def area(a,b,c):
    s = 0.5*(a+b+c)
    answer = ( s * (s-a) * (s-b) * (s-c) )**0.5
    return answer

def determinant( x ):
    # assumes x is a square matrix
    if len(x)==1:
        return x[0][0]
    if len(x)==2:
        return x[0][0]*x[1][1] - x[0][1]*x[1][0]
    row = [0]*(len(x)-1)

    # expand on row #0

    answer = 0
    sign = 1
    for i in range(len(x)):   # for each column in row0
        submatrix = []
        for j in range(1,len(x)):   # for each row after row 0
            submatrix.append( x[j][:i] + x[j][i+1:] )  # jth row without col i
        answer += sign * x[0][i] * determinant( submatrix )
        sign = -sign
    return answer   

t = int(raw_input())


for iter in range(t):
    WX, WY, WZ, XY, XZ, YZ = map(int, raw_input().split())

    d12= WX
    d13= WY
    d14= WZ
    d23= XY
    d24= XZ
    d34= YZ

    matrix =     [ [      0, d12*d12, d13*d13, d14*d14, 1] ]
    matrix.append( [d12*d12,       0, d23*d23, d24*d24, 1] )
    matrix.append( [d13*d13, d23*d23,       0, d34*d34, 1] )
    matrix.append( [d14*d14, d24*d24, d34*d34,       0, 1] )
    matrix.append( [      1,       1,       1,       1, 0] )

    det = determinant( matrix )

    #print "determinant =", det

    volume = (det/288.0) ** 0.5

    surface =  area(WX, XY, WY)
    surface += area(WX, XZ, WZ)
    surface += area(WY, YZ, WZ)
    surface += area(XY, YZ, XZ)

    inradius = 6.0*volume / 2.0/ surface

    print "%.4f" % inradius