#include <iostream>
#include <sstream>
#include <string>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <cassert>

using namespace std;

#define FOR(i,k,n) for(int i=(k); i<(int)n; ++i)
#define REP(i,n) FOR(i,0,n)
#define FORIT(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)

template<class T> void debug(T begin, T end){ for(T i = begin; i != end; ++i) cout<<*i<<" "; cout<<endl; }

typedef long long ll;
const int INF = 100000000;
const double EPS = 1e-8;
const int MOD = 1000000007;
double distance(double x, double y, double z){
  return sqrt(x*x+y*y+z*z);
}

int main(){
  int N;
  while(cin>>N && N){
    double px[30], py[30], pz[30];
    REP(i, N) cin>>px[i]>>py[i]>>pz[i];
    double x = 50, y = 50, z = 50;
    double p = 0.5;
    REP(iter, 100){
      REP(iter2, 100){
        int idx = 0;
        REP(i, N){
          if(distance(px[idx]-x, py[idx]-y, pz[idx]-z) < distance(px[i]-x, py[i]-y, pz[i]-z)){
            idx = i;
          }
        }
        x += (px[idx] - x) * p;
        y += (py[idx] - y) * p;
        z += (pz[idx] - z) * p;
      }
      p *= 0.5;
    }
    double ans = 0;
    REP(i, N) ans = max(ans, distance(px[i]-x, py[i]-y, pz[i]-z));
    printf("%.6f\n", ans);
  }
  return 0;
}