N;double X[30],Y[30],Z[30],cx,cy,cz;
#define Q(x)(x)*(x)
double distance2(int i) { return sqrt(Q(X[i]-cx)+Q(Y[i]-cy)+Q(Z[i]-cz)); }
int longest() { 
	double max = 0; int max_i;
	for (int i=0; i<N; ++i)
		if (distance2(i) > max){
			max=distance2(i);
			max_i=i;
		}
		return max_i;
}
int main() {
	while (scanf("%d",&N) && N) {
		for (int i=0; i<N; ++i) scanf("%lf%lf%lf", X+i, Y+i, Z+i);
		cx = cy = cz = 0.5;
		for (double d=0.5; d>1e-8; d/=2) {
			for (int t=0; t<100; ++t) {
				int i = longest();
				cx += (X[i]-cx)*d;
				cy += (Y[i]-cy)*d;
				cz += (Z[i]-cz)*d;
			}
		}
		printf("%.5f\n", distance2(longest()));
	}
return 0;
}