#include <iostream>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <cstdio>
#include <vector>
using namespace std;

struct P{
	double x,y,z;
};

double dist(P a,P b){
	double x = a.x - b.x;
	double y = a.y - b.y;
	double z = a.z - b.z;
	return x * x + y * y + z * z;
}
int main(){
	int N;
	P p[30];
	while( cin >> N && N){
		for(int i = 0 ; i < N ; i++)
			cin >> p[i].x >> p[i].y >> p[i].z;
		
		double e = 1.0;
		P pos;
		pos.x = 0;
		pos.y = 0;
		pos.z = 0;
		while( e > 1e-8 ){
			double dis = -1;
			int idx = 0;
			for(int i = 0 ; i < N ; i++){
				if( dis < dist(pos,p[i]) ){
					dis = dist(pos,p[i]);
					idx = i;
				}
			}
			double x = p[idx].x - pos.x;
			double y = p[idx].y - pos.y;
			double z = p[idx].z - pos.z;
			pos.x += x * e;
			pos.y += y * e;
			pos.z += z * e;
			e *= 0.998;
		}
		double dis = -1;
		int idx = 0;
		for(int i = 0 ; i < N ; i++){
			if( dis < dist(pos,p[i]) ){
				dis = dist(pos,p[i]);
				idx = i;
			}
		}
		printf("%.8lf\n",sqrt(dis));
	}
}