//  Super Star Aizu - 1231 
//  status:
//  time:
//  main.cpp
//  Created by livin2 on 18/04/20.
//  Copyright © 2017年 livin2. All rights reserved.
//  Note:#
//#include <cstdio>
#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
#include <iomanip>
//#include <map>
//#include <fstream>
using namespace std;
const int precision = 100000;
const double DZERO = 1e-9;
const double PI = acos(-1.0);
const int INF = 0x3f3f3f3f;
struct pos
{
	double x, y,z;
	pos() {}
	pos(double x,double y,double z):x(x),y(y),z(z){}
	void moveRand(double step);
};
double len(const pos &a,const pos &b)
{
	return sqrt((a.x - b.x)*(a.x - b.x) + (a.y - b.y)*(a.y - b.y) + (a.z - b.z)*(a.z - b.z));
}
double Rand()
{
	return (double)(rand() % precision) / precision;
}

struct SuperStar
{
	int n;
	//double X, Y;
	double maxX = 100.0;
	double Dstep, ans;
	pos ansp;
	static const int pRandNum = 40;
	static const int stepRandNum = 20;
	const double minDstep = 1e-6;
	const double ratio = 0.98;
	vector<pos> P;
	vector<double> Rs;
	vector<pos> ansPs;
	SuperStar(int n);
	pos posRand();
	double getRadius(const pos &p);
	bool isInRange(const pos &p);
	void solve();
};
int main()
{
	double x, y;int n;
	while (cin>>n&&n)
	{
		SuperStar exp(n);
		exp.solve();
		cout <<fixed<<setprecision(5)
			<<exp. ans << endl;
	}
	return 0;
}

SuperStar::SuperStar(int n):n(n),Rs(pRandNum), ansPs(pRandNum)
{
	double xx, yy,zz;
	for (int i = 0; i < n; i++)
	{
		cin >> xx >> yy>>zz;
		P.push_back(pos(xx,yy,zz));
	}
	Dstep = sqrt(2) * maxX / sqrt(n);//sqrt (2) *...
}
void pos::moveRand(double step)
{
	double ang = Rand() * 2 * PI;
	z += step * sin(ang);
	double xy = step * cos(ang);
	ang = Rand() * 2 * PI;
	x += xy * cos(ang);
	y += xy * sin(ang);
	
}
pos SuperStar::posRand()
{
	double x = maxX * Rand();
	double y = maxX * Rand();
	double z = maxX * Rand();
	return pos(x,y,z);
}

double SuperStar::getRadius(const pos &p)
{
	double res = 0;
	for (int i = 0; i < P.size(); i++)
		res = max(res,len(P[i],p));
	return res;
}

bool SuperStar::isInRange(const pos & p)
{
	if (p.x > DZERO&&p.x - maxX <= DZERO && p.y > DZERO&&p.y - maxX <= DZERO && p.z > DZERO&&p.z - maxX <= DZERO)
		return true;
	return false;
}



void SuperStar::solve()
{
	//init
	for (int i = 0; i < pRandNum; i++)
	{
		ansPs[i] = posRand();
		Rs[i] = getRadius(ansPs[i]);
	}
	//SA
	while (Dstep>minDstep)
	{
		for (int i = 0; i < pRandNum; i++)
		{
			pos cur = ansPs[i];
			for (int j = 0; j < stepRandNum; j++)
			{
				cur.moveRand(Dstep);
				if (isInRange(cur))
				{
					double rad = getRadius(cur);
					if (rad < Rs[i])
					{
						Rs[i] = rad;
						ansPs[i].x = cur.x;
						ansPs[i].y = cur.y;
						ansPs[i].z = cur.z;
					}
				}
			}
		}
		Dstep *= ratio;
	}
	//
	ans = INF;
	ansp = ansPs[0];
	for (int i = 0; i < pRandNum; i++)
	{
		if (Rs[i] < ans)
		{
			ans = Rs[i];
			ansp = ansPs[i];
		}
	}
}



