#include<iostream>
#include<vector>
#include<cmath>

using namespace std;

typedef double elem;

const elem eps = 1.0e-8;
const elem inf = 1.0e20;

bool eq(elem a, elem b){return abs(b-a)<eps;}
bool leq(elem a, elem b){return eq(a,b)||a<b;}

struct point{
  elem x,y,z;
  point(elem x, elem y, elem z):x(x),y(y),z(z){}
  point():x(0),y(0),z(0){}

  const point operator+(const point &t)const{
    return point(x+t.x,y+t.y,z+t.z);
  }
  const point operator-(const point &t)const{
    return point(x-t.x,y-t.y,z-t.z);
  }
  const point operator*(elem t)const{
    return point(t*x,t*y,t*z);
  }
  const point operator/(elem t)const{
    return point(x/t,y/t,z/t);
  }

  elem length()const{
    return sqrt(x*x+y*y+z*z);
  }
  elem dot(const point &t)const{
    return x*t.x+y*t.y+z*t.z;
  }
};

ostream &operator<<(ostream &os, const point &t){
  os << '(' << t.x << ',' << t.y << ',' << t.z << ')';
}
const point far_point(inf,inf,inf);

typedef point vec;

struct sphere{
  point center;
  elem r;
  sphere ():center(0.0,0.0,0.0),r(0.0){}
  sphere (point c, elem r):center(c),r(r){}
  bool inside(const point &t)const{
    //cout << r << ' ' << (t-center).length() << endl;
    return leq( (t-center).length(), r );
  }
};

inline point centerPoint(point a, point b)
{
  return (a+b)/2;
}

inline point circumscribedCircleCenter(point a, point b, point c)
{
  vec va=b-a;
  vec vb=c-a;
  elem A=va.length();
  elem B=vb.length();
  elem C=va.dot(vb)/(A*B);
  elem ds=2*A*pow(C,2.0)-2*A;
  elem dt=2*B*pow(C,2.0)-2*B;
  if( eq(ds,0.0) || eq(dt,0.0) ) return far_point;
  elem s=(B*C-A)/(2*A*pow(C,2.0)-2*A);
  elem t=(A*C-B)/(2*B*pow(C,2.0)-2*B);
  return a+va*s+vb*t;
}

inline point circumscribedTetrahedronCenter(point a, point b, point c, point d)
{
  vec B=b-a;elem la=B.length();
  vec C=c-a;elem lb=C.length();
  vec D=d-a;elem lc=D.length();
  elem delta = B.x*(C.y*D.z-D.y*C.z)+C.x*(D.y*B.z-B.y*D.z)+D.x*(B.y*C.z-C.y*B.z);
  if( eq( delta, 0.0 ) ) return far_point;
  elem x=(B.y*C.z-C.y*B.z)*pow(lc,2.0)+(D.y*B.z-B.y*D.z)*pow(lb,2.0)+(C.y*D.z-D.y*C.z)*pow(la,2.0);
  elem y=(C.x*B.z-B.x*C.z)*pow(lc,2.0)+(B.x*D.z-D.x*B.z)*pow(lb,2.0)+(D.x*C.z-C.x*D.z)*pow(la,2.0);
  elem z=(B.x*C.y-C.x*B.y)*pow(lc,2.0)+(D.x*B.y-B.x*D.y)*pow(lb,2.0)+(C.x*D.y-D.x*C.y)*pow(la,2.0);
  x/=2;y/=2;z/=2;
  return a+point(x,y,z)/delta;
}

elem solve(const vector<point> &vp)
{
  elem answer = inf;
  // nC2
  for(int i = 0; i < vp.size(); ++i){
    for(int j = i + 1; j < vp.size(); ++j){
      bool isContainingBall = true;
      sphere s(centerPoint(vp[i],vp[j]),(vp[i]-vp[j]).length()/2);
      for(int k = 0; k < vp.size(); ++k){
	if( !s.inside( vp[k] ) ){
	  isContainingBall = false;
	  break;
	}
      }
      if( isContainingBall ){
	answer = leq( s.r, answer ) ? s.r : answer;
      }
    }
  }

  // nC3
  for(int i = 0; i < vp.size(); ++i){
    for(int j = i + 1; j < vp.size(); ++j){
      for(int k = j + 1; k < vp.size(); ++k){
	bool isContainingBall = true;
	point cent = circumscribedCircleCenter(vp[i],vp[j],vp[k]);
	sphere s(cent, (vp[i]-cent).length() );
	for(int l = 0; l < vp.size(); ++l){
	  if( !s.inside( vp[l] ) ){
	    isContainingBall = false;
	    break;
	  }
	}
	if( isContainingBall ){
	  answer = leq( s.r, answer ) ? s.r : answer;
	}
      }
    }
  }
  
  // nC4
  for(int i = 0; i < vp.size(); ++i){
    for(int j = i + 1; j < vp.size(); ++j){
      for(int k = j + 1; k < vp.size(); ++k){
	for(int l = k + 1; l < vp.size(); ++l ){
	  bool isContainingBall = true;
	  point cent = circumscribedTetrahedronCenter(vp[i],vp[j],vp[k],vp[l]);
	  sphere s(cent, (vp[i]-cent).length() );
	  //cout << s.center << endl;
	  for(int m = 0; m < vp.size(); ++m){
	    if( !s.inside( vp[m] ) ){
	      isContainingBall = false;
	      break;
	    }
	  }
	  if( isContainingBall ){
	    answer = leq( s.r, answer ) ? s.r : answer;
	  }
	}
      }
    }
  }
  
  return answer;
}

int main()
{
  while(true){
    int n;
    vector<point> vp;

    cin >> n;
    if( n == 0 ) break;

    for(int i = 0; i < n; ++i){
      elem x,y,z;
      cin >> x >> y >> z;
      vp.push_back( point(x,y,z) );
    }
    
    printf("%.7lf\n", solve(vp));

  }
  return 0;
}

Measured memory_bytes: 0