#include "bits/stdc++.h"
#include<cassert>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
#define all(a)  (a).begin(),(a).end()
#define vi vector<int>
#define pb push_back
#define INF 999999999
//#define INF (1LL<<59)

#define EPS (1e-10)
class P{                    //テァツつケ
public:
	double x,y;
	
	P(double _x=0,double _y=0):x(_x),y(_y){};
	P operator + (const P &p     )const{ return P( x+p.x , y+p.y ); }  //テ・ツ環?ァツョツ?
	P operator - (const P &p     )const{ return P( x-p.x , y-p.y ); }  //テヲツクツ崚ァツョツ?
	P operator * (const double k )const{ return P( x*k   , y*k    ); } //テ、ツケツ療ァツョツ?
	P operator / (const double k )const{ return P( x/k   , y/k    ); } //テゥツ卍、テァツョツ?
	
	bool operator == (const P &p){ return ( fabs(x-p.x)<EPS && fabs(y-p.y)<EPS ); }
	bool operator < (const P &p) const{ return ( x!=p.x ? x<p.x:y<p.y ); }
	
	double norm(){ return x*x+y*y; }        //テ」ツδ偲」ツδォテ」ツδ?
	double abs() { return sqrt(norm()); }   //テ・ツ、ツァテ」ツ?催」ツ??
	void normalize() {double d = sqrt(x*x+y*y); x /= d; y /= d;}	//テヲツュツ」ティツヲツ湘・ツ個?
};
struct C{P p;double r;};    //テ・ツ??
struct S{P p1,p2;};         //テァツキツ堙・ツ按?
typedef vector<P> Polygon;  //テ・ツ、ツ堙ィツァツ津・ツスツ「
typedef P Vector;           //テ」ツδ凖」ツつッテ」ツδ暗」ツδォ
typedef S L;                //テァツ崢エテァツキツ?

double dot  (Vector a,Vector b) { return a.x*b.x+a.y*b.y; }
double cross(Vector a,Vector b) { return a.x*b.y-a.y*b.x; }
double sqDist(P a, P b)         {return (a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y);}
double dist (P a, P b)          {return sqrt(sqDist(a,b));}
Vector vec(S a)                 {return P(a.p2.x-a.p1.x,a.p2.y-a.p1.y);}


//テァツキツ堙・ツ按?」ツ?ョテ・ツ楪づァツ崢エテ、ツコツ古ァツュツ嘉・ツ按?ァツ崢エテァツキツ堙」ツつ津ヲツアツづ」ツつ?」ツつ?
S getBisector(P a, P b){
	Vector vect = vec(S{a,b});
	P n = P(vect.y, -vect.x);
	n.normalize();
	P cent = (a+b)/2.0;
	return S{cent,cent+n};
}


// テァツ崢エテァツキツ堙」ツ?ィテァツ崢エテァツキツ堙」ツ?ョテ、ツコツ、テァツつケ vefiried AOJ CGL_2
P getCrossPointSS(S l1, S l2){
	double A = cross(vec(l1), vec(l2));
	double B = cross(vec(l1), l1.p2 - l2.p1);
	if(abs(A)<EPS && abs(B)<EPS) return l2.p1; // テ、ツコツ古ァツ崢エテァツキツ堙」ツ?古ゥツ?催」ツ?ェテ」ツ?」テ」ツ?ヲテ」ツ??」ツつ?
	if(abs(A)<EPS) assert(false); // テァツ崢エテァツキツ堙」ツ?古、ツコツ、テ」ツつ湘」ツつ嘉」ツ?ェテ」ツ??
	return l2.p1 + vec(l2) * B / A;
}


int main(){
	int n;
	cin>>n;
	rep(hoge,n){
		vector<P> points(3);
		rep(i,3)cin>>points[i].x>>points[i].y;
		
		vector<S> bisectors(2);
		rep(i,2) bisectors[i] = getBisector(points[i], points[i+1]);
		
		P cent = getCrossPointSS(bisectors[0], bisectors[1]);
		
		
		printf("%.3lf %.3lf %.3lf\n",cent.x,cent.y,dist(cent,points[1]));
	}
}