#include<stdio.h>
#include<math.h>
#define P(x) pow(double(x),2)



int main(){


	int i,j,k;
	int n;
	double x[3],y[3];
	double xp,yp,r;
	double a1,a2,b1,b2,c1,c2;
	
	while((scanf("%d",&n))!=EOF){
		for(i=0;i<3;i++){
			scanf("%lf",&x[i]);
			scanf("%lf",&y[i]);
		}
		a1=2*(x[1]-x[0]);
		a2=2*(x[2]-x[1]);
		b1=2*(y[1]-y[0]);
		b2=2*(y[2]-y[1]);
		c1=(P(x[0])-P(x[1])+P(y[0])-P(y[1]));
		c2=(P(x[1])-P(x[2])+P(y[1])-P(y[2]));
	
		xp=(b1*c2-b2*c1)/(a1*b2-a2*b1);
		yp=(c1*a2-c2*a1)/(a1*b2-a2*b1);
		r=(double)(sqrt((long double)(((xp-x[0])*(xp-x[0]))+((yp-y[0])*(yp-y[0])))));	


		printf("%.3f %.3f %.3f\n",xp,yp,r);

	}



}