for _ in range(int(eval(input()))):

    x1, y1, x2, y2, x3, y3 = list(map(float, input().split()))

    d = 2 * (x2 * y3 - x3 * y2 + x3 * y1 - x1 * y3 + x1 * y2 - x2 * y1)

    px = ((y2 - y3) * (x1 ** 2 + y1 ** 2) + (y3 - y1) * (x2 ** 2 + y2 ** 2) + (y1 - y2) * (x3 ** 2 + y3 ** 2)) / d

    py = -1 * ((x2 - x3) * (x1 ** 2 + y1 ** 2) + (x3 - x1) * (x2 ** 2 + y2 ** 2) + (x1 - x2) * (x3 ** 2 + y3 ** 2)) / d

    print(('{0:.3f} {1:.3f} {2:.3f}'.format(px, py, ((x1 - px) ** 2 + (y1 - py) ** 2) ** 0.5)))
for _ in[0]*int(eval(input())):

 a,d,b,e,c,f=list(map(float,input().split()))

 z=2*(b*f-c*e+c*d-a*f+a*e-b*d)

 x=((e-f)*(a**2+d**2)+(f-d)*(b**2+e**2)+(d-e)*(c**2+f**2))/z

 y=((c-b)*(a**2+d**2)+(a-c)*(b**2+e**2)+(b-a)*(c**2+f**2))/z

 print(('{0:.3f} {1:.3f} {2:.3f}'.format(x,y,((a-x)**2+(d-y)**2)**0.5)))
for _ in range(int(eval(input()))):
    x1, y1, x2, y2, x3, y3 = list(map(float, input().split()))
    d = 2 * (x2 * y3 - x3 * y2 + x3 * y1 - x1 * y3 + x1 * y2 - x2 * y1)
    px = (
        (y2 - y3) * (x1**2 + y1**2)
        + (y3 - y1) * (x2**2 + y2**2)
        + (y1 - y2) * (x3**2 + y3**2)
    ) / d
    py = (
        -1
        * (
            (x2 - x3) * (x1**2 + y1**2)
            + (x3 - x1) * (x2**2 + y2**2)
            + (x1 - x2) * (x3**2 + y3**2)
        )
        / d
    )
    print(
        (
            "{0:.3f} {1:.3f} {2:.3f}".format(
                px, py, ((x1 - px) ** 2 + (y1 - py) ** 2) ** 0.5
            )
        )
    )

for _ in [0] * int(eval(input())):
    a, d, b, e, c, f = list(map(float, input().split()))
    z = 2 * (b * f - c * e + c * d - a * f + a * e - b * d)
    x = (
        (e - f) * (a**2 + d**2)
        + (f - d) * (b**2 + e**2)
        + (d - e) * (c**2 + f**2)
    ) / z
    y = (
        (c - b) * (a**2 + d**2)
        + (a - c) * (b**2 + e**2)
        + (b - a) * (c**2 + f**2)
    ) / z
    print(
        ("{0:.3f} {1:.3f} {2:.3f}".format(x, y, ((a - x) ** 2 + (d - y) ** 2) ** 0.5))
    )

-for _ in range(int(eval(input()))): -    x1, y1, x2, y2, x3, y3 = list(map(float, input().split())) -    d = 2 * (x2 * y3 - x3 * y2 + x3 * y1 - x1 * y3 + x1 * y2 - x2 * y1) -    px = ( -        (y2 - y3) * (x1**2 + y1**2) -        + (y3 - y1) * (x2**2 + y2**2) -        + (y1 - y2) * (x3**2 + y3**2) -    ) / d -    py = ( -        -1 -        * ( -            (x2 - x3) * (x1**2 + y1**2) -            + (x3 - x1) * (x2**2 + y2**2) -            + (x1 - x2) * (x3**2 + y3**2) -        ) -        / d +for _ in [0] * int(eval(input())): +    a, d, b, e, c, f = list(map(float, input().split())) +    z = 2 * (b * f - c * e + c * d - a * f + a * e - b * d) +    x = ( +        (e - f) * (a**2 + d**2) +        + (f - d) * (b**2 + e**2) +        + (d - e) * (c**2 + f**2) +    ) / z +    y = ( +        (c - b) * (a**2 + d**2) +        + (a - c) * (b**2 + e**2) +        + (b - a) * (c**2 + f**2) +    ) / z +    print( +        ("{0:.3f} {1:.3f} {2:.3f}".format(x, y, ((a - x) ** 2 + (d - y) ** 2) ** 0.5)) -    print( -        ( -            "{0:.3f} {1:.3f} {2:.3f}".format( -                px, py, ((x1 - px) ** 2 + (y1 - py) ** 2) ** 0.5 -            ) -        ) -    )