#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <complex>
#include <cstring>
#include <cstdlib>
#include <string>
#include <cmath>
#include <queue>
#include <set>
#include <map>
using namespace std;

#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()
const int INF = 1<<29;

struct P {
  double x,y,z;
};

double dis2(P a, P b) {
  return (a.x-b.x)*(a.x-b.x) + (a.y-b.y)*(a.y-b.y) + (a.z-b.z)*(a.z-b.z);
}

int main() {
  int n;
  while(cin>>n,n) {
    P p[n];
    REP(i,n) {
      double x,y,z;
      cin >>x>>y>>z;
      p[i] = (P){x,y,z};
    }
    P now = (P){50,50,50};
    double move = 0.5;
    double ans;
    while(move > 1e-9) {
//      printf("(%f,%f,%f)\n", now.x,now.y,now.z);
      REP(i,100) {
        int k;
        double ma = 0;
        REP(j,n) {
          double d = dis2(now, p[j]);
          if (ma < d) {
            ma = d;
            k = j;
          }
        }
        now.x += (p[k].x-now.x)*move;
        now.y += (p[k].y-now.y)*move;
        now.z += (p[k].z-now.z)*move;
        ans = ma;
      }
      move /= 2;
    }
    printf("%.5f\n", sqrt(ans));
  }
}