#pragma GCC optimize(2)
#include<algorithm>
#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
#define ft first
#define sd second
#define all(c) ((c).begin()), ((c).end())
#define mp(a, b) make_pair(a, b)
#define pb(x) push_back(x)
const int maxn = 1e5+5;
typedef long long ll;
const ll mod = 1e9+7;
int Case = 1;
int n, m;
struct node{
    double x, y, z;
}cc[maxn];
double res, t;
const double delta = 0.98;
void sa() {
    t = 2000;res = 1e18;
    double resx = 0, resy = 0, resz = 0;
    while(t > 1e-10) {
        double rt = 0;int p;
        for(int i = 1; i <= n; i++) {
            double deltax = resx-cc[i].x, deltay = resy-cc[i].y, deltaz = resz-cc[i].z;
            double len = sqrt(deltax*deltax+deltay*deltay+deltaz*deltaz);
            if(len > rt) {
                rt = len;p = i;
            }
        }
        res = min(res, rt);
        resx += (cc[p].x-resx)/rt*t;
        resy += (cc[p].y-resy)/rt*t;
        resz += (cc[p].z-resz)/rt*t;
        t *= delta;
    }
}
void solve() {
    for(int i = 1; i <= n; i++)
        cin>>cc[i].x>>cc[i].y>>cc[i].z;
    sa();
    printf("%.5f\n", res);
    return;
}
int main() {
    ios::sync_with_stdio(false);cin.tie(0);std::cout.tie(0);
#ifndef ONLINE_JUDGE
    freopen("in.txt", "r", stdin);
    //freopen("out.txt","w",stdout);
#endif
    //scanf("%d", &Case);
    while(cin>>n && n){
        solve();
    }
    return 0;
}