Problem: The Galaxy contains n planets, there are many different living creatures inhabiting each planet. And each creature can get into troubles! Space rescuers know it perfectly well and they are always ready to help anyone who really needs help. All you need to do is call for them. 

Now the space rescuers plan to build the largest in the history of the Galaxy rescue station; however, the rescue station's location is yet to be determined. As some cases are real emergencies, the rescuers want to find such a point in the Galaxy from which it would be possible to get to the remotest planet in the minimum possible time. In other words, the rescuers need such point in the space that the distance between it and the planet remotest from it was minimal (if we compare this point with all other possible points in the space). Unfortunately, the rescuers can't sole this problem.

As the planets are quite remote from each other, they can be considered as points in Euclidean three-dimensional space. The distance between points (xi, yi, zi) and (xj, yj, zj) can be calculated by the formula <image>. The rescue station can be positioned in any point in the space. It can also coincide with some planet. 

Galaxy is in danger! Save the space rescuers and find the required point for them.

Input

The first line of the input file contains integer n — the number of planets (1 ≤ N ≤ 100). Each of the following n lines contains information about the planets. The i-th line contains three integers xi, yi, zi — the coordinates of the i-th planet ( - 104 ≤ xi, yi, zi ≤ 104, 1 ≤ i ≤ n). No two planets coincide.

Output

Print on the first line of the output file three space-separated real numbers x0, y0, z0 — the coordinates for the future base. If there are several solutions, you are allowed to print any of them. The answer will be accepted if the distance from this point to the remotest planet will differ from the juries' variant in no more than 10 - 6 in absolute or relative value.

Examples

Input

5
5 0 0
-5 0 0
0 3 4
4 -3 0
2 2 -2


Output

0.000 0.000 0.000

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
array<double, 3> operator-(array<double, 3> a, array<double, 3> b) {
  return {{a[0] - b[0], a[1] - b[1], a[2] - b[2]}};
}
array<double, 3> operator+(array<double, 3> a, array<double, 3> b) {
  return {{a[0] + b[0], a[1] + b[1], a[2] + b[2]}};
}
array<double, 3> Cross(array<double, 3> a, array<double, 3> b) {
  return {{a[1] * b[2] - b[1] * a[2], a[2] * b[0] - b[2] * a[0],
           a[0] * b[1] - b[0] * a[1]}};
}
double Dot(array<double, 3> a, array<double, 3> b) {
  return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
}
double len2(array<double, 3> a) { return Dot(a, a); }
double len(array<double, 3> a) { return sqrt(len2(a)); }
array<double, 3> operator*(double a, array<double, 3> v) {
  return {{a * v[0], a * v[1], a * v[2]}};
}
array<double, 3> operator/(array<double, 3> v, double a) { return (1 / a) * v; }
array<double, 3> read() {
  int a, b, c;
  scanf("%d%d%d", &a, &b, &c);
  array<double, 3> ret = {{(double)a, (double)b, (double)c}};
  return ret;
}
const double eps = 1e-12;
const int NN = 4;
bool solve(double p[NN - 1][NN], double x[NN - 1], int n) {
  for (int i = 0; i < n; i++) {
    int d = i;
    double v = abs(p[i][i]);
    for (int j = i + 1; j < n; j++) {
      if (v < abs(p[j][i])) {
        v = abs(p[j][i]);
        d = j;
      }
    }
    if (abs(v) < eps) {
      return false;
    }
    if (d != i) {
      for (int j = i; j < n + 1; j++) {
        swap(p[i][j], p[d][j]);
      }
    }
    for (int j = i + 1; j < n; j++) {
      double r = p[j][i] / p[i][i];
      for (int k = i; k < n + 1; k++) {
        p[j][k] -= r * p[i][k];
      }
    }
  }
  for (int i = n - 1; i >= 0; i--) {
    if (abs(p[i][i]) < eps) {
      return false;
    }
    x[i] = p[i][n];
    for (int j = i + 1; j < n; j++) {
      x[i] -= p[i][j] * x[j];
    }
    x[i] /= p[i][i];
  }
  return true;
}
array<double, 3> in[100];
int N;
double ret;
array<double, 3> retv;
void f(array<double, 3> c) {
  double m = 0;
  for (int i = 0; i < N; i++) {
    m = max(m, len2(c - in[i]));
    if (m >= ret) {
      return;
    }
  }
  ret = m;
  retv = c;
}
int main() {
  scanf("%d", &N);
  for (int i = 0; i < N; i++) {
    in[i] = read();
  }
  ret = 1e30;
  f(in[0]);
  for (int i = 0; i < N; i++) {
    f(in[i]);
    for (int j = i + 1; j < N; j++) {
      array<double, 3> c = (in[i] + in[j]) / 2;
      f(c);
      array<double, 3> u = (in[j] - in[i]) / 2;
      double du = len2(u);
      if (du == 0) {
        continue;
      }
      for (int k = j + 1; k < N; k++) {
        array<double, 3> v = (in[k] - in[i]) / 2;
        double dv = len2(v);
        if (dv == 0) {
          continue;
        }
        array<double, 3> uv = Cross(u, v);
        if (len2(uv) < eps) {
          continue;
        }
        double M[3][4];
        for (int t = 0; t < 3; t++) {
          M[0][t] = u[t];
          M[1][t] = v[t];
          M[2][t] = uv[t];
        }
        M[0][3] = du;
        M[1][3] = dv;
        M[2][3] = 0;
        double x[3] = {};
        if (solve(M, x, 3)) {
          array<double, 3> a = {{x[0], x[1], x[2]}};
          if (len2(a) < ret) {
            f(in[i] + a);
          }
        }
        for (int l = k + 1; l < N; l++) {
          array<double, 3> w = (in[l] - in[i]) / 2;
          double dw = len2(w);
          if (dw == 0) {
            continue;
          }
          for (int t = 0; t < 3; t++) {
            M[0][t] = u[t];
            M[1][t] = v[t];
            M[2][t] = w[t];
            x[t] = 0;
          }
          M[0][3] = du;
          M[1][3] = dv;
          M[2][3] = dw;
          if (solve(M, x, 3)) {
            array<double, 3> a = {{x[0], x[1], x[2]}};
            if (len2(a) < ret) {
              f(in[i] + a);
            }
          }
        }
      }
    }
  }
  printf("%.17lf %.17lf %.17lf\n", retv[0], retv[1], retv[2]);
  return 0;
}