Problem: During a voyage of the starship Hakodate-maru (see Problem A), researchers found strange synchronized movements of stars. Having heard these observations, Dr. Extreme proposed a theory of "super stars". Do not take this term as a description of actors or singers. It is a revolutionary theory in astronomy.

According to this theory, stars we are observing are not independent objects, but only small portions of larger objects called super stars. A super star is filled with invisible (or transparent) material, and only a number of points inside or on its surface shine. These points are observed as stars by us.

In order to verify this theory, Dr. Extreme wants to build motion equations of super stars and to compare the solutions of these equations with observed movements of stars. As the first step, he assumes that a super star is sphere-shaped, and has the smallest possible radius such that the sphere contains all given stars in or on it. This assumption makes it possible to estimate the volume of a super star, and thus its mass (the density of the invisible material is known).

You are asked to help Dr. Extreme by writing a program which, given the locations of a number of stars, finds the smallest sphere containing all of them in or on it. In this computation, you should ignore the sizes of stars. In other words, a star should be regarded as a point. You may assume the universe is a Euclidean space.



Input

The input consists of multiple data sets. Each data set is given in the following format.


n
x1 y1 z1
x2 y2 z2
...
xn yn zn


The first line of a data set contains an integer n, which is the number of points. It satisfies the condition 4 ≤ n ≤ 30.

The locations of n points are given by three-dimensional orthogonal coordinates: (xi, yi, zi) (i = 1,..., n). Three coordinates of a point appear in a line, separated by a space character.

Each value is given by a decimal fraction, and is between 0.0 and 100.0 (both ends inclusive). Points are at least 0.01 distant from each other.

The end of the input is indicated by a line containing a zero.

Output

For each data set, the radius ofthe smallest sphere containing all given points should be printed, each in a separate line. The printed values should have 5 digits after the decimal point. They may not have an error greater than 0.00001.

Example

Input

4
10.00000 10.00000 10.00000
20.00000 10.00000 10.00000
20.00000 20.00000 10.00000
10.00000 20.00000 10.00000
4
10.00000 10.00000 10.00000
10.00000 50.00000 50.00000
50.00000 10.00000 50.00000
50.00000 50.00000 10.00000
0


Output

7.07107
34.64102

Solution (in CPP):

Solution:
//  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];
		}
	}
}