#include<iostream>
#include<valarray>
#include<cmath>

using namespace std;

double dist(valarray<double> a,valarray<double> b){
  double s=0;
  for(int i=0;i<3;i++){
    s+=(a[i]-b[i])*(a[i]-b[i]);
  }
  return sqrt(s);
}

int main(){
  for(int n;cin>>n,n;){
    valarray<double> p[30];
    for(int i=0;i<n;i++){
      p[i].resize(3);
      cin>>p[i][0]>>p[i][1]>>p[i][2];
    }
    valarray<double> c(50,3);
    double w=1;
    double ld;
    for(int i=0;i<100000;i++,w*=.999){
      double m=-1;
      int x;
      for(int j=0;j<n;j++){
	auto d=dist(p[j],c);
	if(d>m){
	  m=d;
	  x=j;
	}
      }
      ld=m;
      valarray<double> v=p[x]-c;
      c+=v*w;
    }
    cout.precision(5);
    cout<<fixed<<ld<<endl;
  }
}