import std.stdio, std.string, std.complex, std.algorithm, std.conv;

alias Complex!real z;

void main()
{
    foreach(_; 0 .. readln.chomp.to!int)
    {
        auto f = readln.split.map!(to!real);
        z a = z(f[0], f[1]),
          b = z(f[2], f[3]),
          c = z(f[4], f[5]);
        z p = (a * a.conj * (b - c) + b * b.conj * (c - a) + c * c.conj * (a - b)) / 
              (a.conj * (b - c) + b.conj * (c - a) + c.conj * (a - b));

        writefln("%.3f %.3f %.3f", p.re, p.im, (p - a).abs);
    }
}