process.stdin.on("data",function(c){
	(c+"").trim().split("\n").slice(1).some(function(n){
		n=n.split(" ");
		var x1=+n[0],y1=+n[1],x2=+n[2],y2=+n[3],x3=+n[4],y3=+n[5],
		a=2*(x1-x2),b=2*(y1-y2),c=x1*x1+y1*y1-(x2*x2+y2*y2),
		d=2*(x1-x3),e=2*(y1-y3),f=x1*x1+y1*y1-(x3*x3+y3*y3),
		z=a*e-b*d,x=(c*e-f*b)/z,y=(f*a-c*d)/z;
		console.log(x.toFixed(3),y.toFixed(3),Math.sqrt(Math.pow(x-x1,2)+Math.pow(y-y1,2)).toFixed(3));
	});
}).resume();