//config = { input: 'tmp', newline: '\r\n' }; // win
config = { input: '/dev/stdin', newline: '\n' }; // linux

line = require('fs').readFileSync(config.input, 'ascii').trim()
	.split(config.newline);
line.shift();
line.forEach(calc);

function calc(line) {
	var a = line.split(' ').map(Number);
	var l1 = get_midperpendicular(a[0], a[1], a[2], a[3]);
	var l2 = get_midperpendicular(a[0], a[1], a[4], a[5]);
	var p = get_intersection_point(l1, l2);
	var r = Math.sqrt(sqr(p.x - a[0]) + sqr(p.y - a[1]));
	console.log('%s %s %s', format(p.x), format(p.y), format(r));
}

function get_midperpendicular(x1, y1, x2, y2) {
	return { a: 2 * (y2 - y1), b: 2 * (x2 - x1),
		c: (y2 - y1) * (y2 + y1) + (x2 - x1) * (x2 + x1) };
}

function get_intersection_point(l1, l2) {
	var det = l1.a * l2.b - l1.b * l2.a;
	var x = (l2.b * l1.c - l1.b * l2.c) / det;
	var y = (-l2.a * l1.c + l1.a * l2.c) / det;
	return {x: x, y: y};
}

function sqr(x) { return x * x; }

function format(x) {
	var ary = x.toFixed(4).split('\.');
	if (ary.length === 1) return ary[0] + '.000';
	var decimal_part = (ary[1] + '000').slice(0, 3);
	return ary[0] + '.' + decimal_part;
}