#include <stdio.h>
#include <math.h>

float round(float val, int d) {
	return (int)(val * pow(10, d) + 0.5) / pow(10,d);
}

int main () {
	int n;
	float x1, x2, x3, y1, y2, y3;
	float m1, m2, b1, b2;
	float x, y, r, hx, hy;
	scanf("%d", &n);
	printf("%.3f\n", round(1.2343, 3));
	while (n--) {
		scanf("%f %f %f %f %f %f" , &x1, &y1, &x2, &y2, &x3, &y3);
		if (y1 == y2) {
			x = (x1 + x2) / 2.0;
			m2 = (y3 == y1) ? 0 : (y3 - y1) / (x3 - x1);
			hx = (x1 + x3) / 2.0;
			hy = (y1 + y3) / 2.0;
			b2 = m2 * hx + hy;
			y = -m2 * x + b2;
		} else if (y1 == y3) {
			x = (x1 + x3) / 2.0;
			m1 = (y2 == y1) ? 0 : (y2 - y1) / (x2 - x1);
			hx = (x1 + x2) / 2.0;
			hy = (y1 + y2) / 2.0;
			b1 = m1 * hx + hy;
			y = -m1 * x + b1;
		} else {
			m1 = (x2 == x1) ? 0 : (y2 - y1) / (x2 - x1);
			m2 = (x3 == x1) ? 0 : (y3 - y1) / (x3 - x1);
			hx = (x1 + x2) / 2.0;
			hy = (y1 + y2) / 2.0;
			b1 = m1 * hx + hy;
			hx = (x1 + x3) / 2.0;
			hy = (y1 + y3) / 2.0;
			b2 = m2 * hx + hy;
			x = (b1 - b2) / (m1 - m2);
			y = -m1 * x + b1;
		}
		x = round(x, 3);
		y = round(y, 3);
		r = round(sqrt((x - x1) * (x - x1) + (y - y1) * (y - y1)), 3);
		printf("%.3f %.3f %.3f\n", x, y, r);
	}
	return 0;
}