#include <stdio.h>
#include <math.h>
double mx(double a, double b, double c) {if (a>=b && a>=c) return a; else if (b>=a && b>=c) return b; else return c;}
int main() {int N;while (scanf("%d",&N)!=EOF) {if (!N) return 0;while (N--) {double x1,y1,x2,y2,x3,y3,x,y;scanf("%lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3);x=mx(fabs(x1-x2),fabs(x1-x3),fabs(x2-x3))/2.00;y=mx(fabs(y1-y2),fabs(y1-y3),fabs(y2-y3))/2.00;printf("%.3lf %.3lf %.3lf\n",x,y,sqrt((x-x1)*(x-x1)+(y-y1)*(y-y1)));}}}