
/*
 * main.cpp
 *
 *  Created on: 2011/04/08
 *      Author: satoki
 *      13:00 ~
 */
#include <iostream>
#include <string.h>
using namespace std;

int iN;
double dX[3];
double dY[3];

double dXp;
double dYp;
double dRp;

void init() {
  scanf("%d", &iN);
}

bool input() {
  scanf("%lf %lf %lf %lf %lf %lf"
      , &dX[0], &dY[0], &dX[1], &dY[1], &dX[2], &dY[2]);
  return true;
}

void manage() {

}

int main() {
  int i;
  init();
  for (i = 0; i < iN; i++) {
    input();
    manage();
    printf("%.3f %.3f %.3f\n", dXp, dYp, dRp);
  }
  return 0;
}