#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <cmath>
using namespace std;
const double EPS = 1e-6;
const double INF = 1e12;
 
struct Point{
    double x,y,z;
    Point(double x, double y, double z):x(x), y(y), z(z){}
    Point(){}
    Point &operator +=(const Point &a){ x+=a.x; y+=a.y; z+=a.z; return *this; }
    Point &operator -=(const Point &a){ x-=a.x; y-=a.y; z-=a.z; return *this; }
    Point &operator *=(const double &a){ x*=a; y*=a; z*=a; return *this; }
    Point operator +(const Point &a) const{ return Point(x+a.x, y+a.y, z+a.z); }
    Point operator -(const Point &a) const{ return Point(x-a.x, y-a.y, z-a.z); }
    Point operator *(const double &a) const{ return Point(a*x, a*y, a*z); }
    Point operator -() { return Point(-x, -y, -z); }
};
 
double dot(const Point &a, const Point &b){
    return a.x*b.x +a.y*b.y +a.z*b.z;
}
Point cross(const Point &a, const Point &b){
    return Point(a.y*b.z -a.z*b.y, a.z*b.x -a.x*b.z, a.x*b.y -a.y*b.x);
}
double abs(const Point &a){
    return sqrt(dot(a, a));
}
Point unit(const Point &a){
    return a *(1/abs(a));
}
bool operator ==(const Point &a, const Point &b){
    return abs(a-b) < EPS;
}

vector<double> solve_linear_equation(vector<vector<double> > a){
    int n = a.size();
    for(int i=0; i<n; i++){
        for(int j=i+1; j<n; j++){
            if(abs(a[j][i]) > abs(a[i][i])){
                swap(a[i], a[j]);
            }
        }
        for(int j=n; j>=i; j--){
            a[i][j] /= a[i][i];
        }
        for(int j=i+1; j<n; j++){
            for(int k=n; k>=i; k--){ 
                a[j][k] -= a[i][k]*a[j][i];
            }
        }
    }
    vector<double> res(n);
    for(int i=n-1; i>=0; i--){
        res[i] = a[i][n];
        for(int j=n-1; j>i; j--){
            res[i] -= a[i][j]*res[j];
        }
    }
    return res;
}

int main(){
    while(1){
        int n;
        cin >> n;
        if(n==0) break;

        vector<Point> p(n);
        for(int i=0; i<n; i++){
            cin >> p[i].x >> p[i].y >> p[i].z;
        }

        vector<Point> cand;
        vector<double> r;
        Point c[4];
        for(int i=0; i<n; i++){
            c[0] = p[i];
            for(int j=i+1; j<n; j++){
                c[1] = p[j];
                for(int k=j+1; k<n; k++){
                    c[2] = p[k];
                    for(int l=k+1; l<n; l++){
                        c[3] = p[l];
                        //4点(連立方程式)
                        vector<vector<double> > mat(3, vector<double>(4));
                        for(int s=0; s<3; s++){
                            mat[s][0] = 2*(c[s].x -c[s+1].x);
                            mat[s][1] = 2*(c[s].y -c[s+1].y);
                            mat[s][2] = 2*(c[s].z -c[s+1].z);
                            mat[s][3] = (c[s].x *c[s].x -c[s+1].x *c[s+1].x)
                                +(c[s].y *c[s].y -c[s+1].y *c[s+1].y)
                                +(c[s].z *c[s].z -c[s+1].z *c[s+1].z);
                        }
                        vector<double> ret = solve_linear_equation(mat);
                        double x = c[0].x -ret[0];
                        double y = c[0].y -ret[1];
                        double z = c[0].z -ret[2];
                        cand.push_back(Point(ret[0], ret[1], ret[2]));
                        r.push_back(sqrt(x*x +y*y +z*z));
                    }
                    //3点(外心のベクトル表示)
                    double sin2[3];
                    for(int i=0; i<3; i++){
                        double A = abs(c[(i+1)%3] -c[(i+2)%3]);
                        double B = abs(c[i] -c[(i+1)%3]);
                        double C = abs(c[i] -c[(i+2)%3]);
                        double cosa = (B*B +C*C -A*A)/(2*B*C);
                        sin2[i] = sin(2*acos(cosa));
                    }
                    Point center = (c[0]*sin2[0] +c[1]*sin2[1] +c[2]*sin2[2])
                        *(1/(sin2[0] +sin2[1] +sin2[2]));
                    cand.push_back(center);
                    r.push_back(abs(center -c[0]));
                }
                //2点(直径)
                cand.push_back((c[0]+c[1]) *0.5);
                r.push_back(abs(c[0]-c[1])/2);
            }
        }

        double ans = INF;
        for(int i=0; i<(int)cand.size(); i++){
            bool ok = true;
            for(int j=0; j<n; j++){
                if(abs(p[j] -cand[i]) > r[i] +EPS){
                    ok = false;
                    break;
                }
            }
            if(ok){
                ans = min(ans, r[i]);
            }
        }
        
        cout << fixed << setprecision(5);
        cout << ans << endl;
    }
    return 0;
}



Measured memory_bytes: 5028