#include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define FOR(i,l,r) for(int i=(l);i<=(r);i++)
using namespace std;

typedef double NUM;
struct VEC {
	NUM x,y;
	NUM len() { return hypot(x,y); }
};
VEC operator+(const VEC &a,const VEC &b) { return (VEC){a.x+b.x,a.y+b.y}; }
VEC operator-(const VEC &a,const VEC &b) { return (VEC){a.x-b.x,a.y-b.y}; }
VEC operator/(const VEC &a,const NUM &d) { return (VEC){a.x/d,a.y/d}; }
NUM operator%(const VEC &a,const VEC &b) { return a.x*b.x+a.y*b.y; }
NUM operator*(const VEC &a,const VEC &b) { return a.x*b.y-a.y*b.x; }
ostream &operator<<(ostream &out,const VEC &a) { return out<<a.x<<" "<<a.y; }


VEC pot[3];
int main() {
	int T; scanf("%d",&T);
	for (int tt=1;T--;tt++) {
		FOR (i,0,2) scanf("%lf%lf",&pot[i].x,&pot[i].y);
		VEC A=pot[0],B=pot[1],C=pot[2];
		VEC M=(C-B)/2+B;

		double O = acos(-1) - acos((B-A)%(C-A) / ((B-A).len()*(C-A).len()));  //acos
		//hdoj居然没有M_PI...

		double a=(B-C).len(),b=(A-C).len(),c=(A-B).len();
		double cosB=(a*a+c*c-b*b)/(2*a*c),sinB=sqrt(1-cosB*cosB);
		double R=(C-B).len()/2/sinB;

		double ans=(A-M).len() + R*O;
		printf("Case #%d: %.4f\n",tt,ans);
	}
	return 0;
}
