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>
#pragma comment(linker, "/STACK:16777216")
using namespace std;
template <class T>
inline void checkmin(T &a, T b) {
  if (a > b) a = b;
}
template <class T>
inline void checkmax(T &a, T b) {
  if (a < b) a = b;
}
const int oo = 1 << 30;
const double eps = 1e-8;
const int N = 128;
const int M = 1;
const long long P = 10000000097ll;
int sgn(double x) { return x < -eps ? -1 : (x > eps); }
int fcmp(double a, double b) { return sgn(a - b); }
double sqr(double x) { return x * x; }
struct Point {
  double x, y, z;
  Point() {}
  Point(double x, double y, double z) : x(x), y(y), z(z) {}
  Point operator+(const Point &p) const {
    return Point(x + p.x, y + p.y, z + p.z);
  }
  Point operator-(const Point &p) const {
    return Point(x - p.x, y - p.y, z - p.z);
  }
  Point operator*(double d) const { return Point(x * d, y * d, z * d); }
  Point operator/(double d) const { return Point(x / d, y / d, z / d); }
  double norm() const { return sqrt(x * x + y * y + z * z); }
  void cin() { scanf("%lf %lf %lf", &x, &y, &z); }
  void cout(double r) const { printf("%.9f %.9f %.9f\n", x, y, z); }
};
struct pic {
  Point p[4];
  int pn;
};
Point p[N];
Point o;
int pn;
double r;
double det(double a[], double b[], double c[]) {
  double ans = 0;
  int i;
  for (i = 0; i < (3); i++) ans += a[i] * b[(i + 1) % 3] * c[(i + 2) % 3];
  for (i = 0; i < (3); i++) ans -= a[i] * b[(i + 2) % 3] * c[(i + 1) % 3];
  return ans;
}
void circle(const Point *p) {
  double a[3], b[3], c[3], d[3];
  int i;
  for (i = 0; i < (2); i++) {
    a[i] = 2 * (p[i].x - p[i + 1].x);
    b[i] = 2 * (p[i].y - p[i + 1].y);
    c[i] = 2 * (p[i].z - p[i + 1].z);
    d[i] = sqr(p[i].norm()) - sqr(p[i + 1].norm());
  }
  a[2] = p[0].y * (p[2].z - p[1].z) + p[0].z * (p[1].y - p[2].y) +
         p[1].z * p[2].y - p[1].y * p[2].z;
  b[2] = p[0].x * (p[1].z - p[2].z) + p[0].z * (p[2].x - p[1].x) +
         p[1].x * p[2].z - p[1].z * p[2].x;
  c[2] = p[0].y * (p[1].x - p[2].x) + p[0].x * (p[2].y - p[1].y) +
         p[1].y * p[2].x - p[1].x * p[2].y;
  d[2] = p[0].x * p[1].z * p[2].y + p[0].y * p[1].x * p[2].z +
         p[0].z * p[1].y * p[2].x -
         (p[0].x * p[1].y * p[2].z + p[0].y * p[1].z * p[2].x +
          p[0].z * p[1].x * p[2].y);
  o.x = det(d, b, c) / det(a, b, c);
  o.y = det(a, d, c) / det(a, b, c);
  o.z = det(a, b, d) / det(a, b, c);
  r = (o - p[0]).norm();
}
void ball(const Point *p) {
  double a[3], b[3], c[3], d[3];
  int i;
  for (i = 0; i < (3); i++) {
    a[i] = 2 * (p[i].x - p[i + 1].x);
    b[i] = 2 * (p[i].y - p[i + 1].y);
    c[i] = 2 * (p[i].z - p[i + 1].z);
    d[i] = sqr(p[i].norm()) - sqr(p[i + 1].norm());
  }
  o.x = det(d, b, c) / det(a, b, c);
  o.y = det(a, d, c) / det(a, b, c);
  o.z = det(a, b, d) / det(a, b, c);
  r = (o - p[0]).norm();
}
void maintain(pic c) {
  switch (c.pn) {
    case 1:
      o = c.p[0];
      r = 0;
      break;
    case 2:
      o = (c.p[0] + c.p[1]) / 2;
      r = (o - c.p[0]).norm();
      break;
    case 3:
      circle(c.p);
      break;
    case 4:
      ball(c.p);
      break;
  }
}
void min_ball(int n, pic c) {
  c.pn++;
  int i, j, m;
  Point t;
  for (i = 0; i < (n); i++)
    if ((p[i] - o).norm() > r) {
      c.p[c.pn - 1] = p[i];
      maintain(c);
      if (c.pn < 4) min_ball(i, c);
    }
}
void doit() {
  int i, j, k;
  double tmp = 0.0001;
  double dis;
  int id;
  for (i = 0; i < (200); i++) {
    dis = 0;
    j = -1;
    for (j = 0; j < (pn); j++)
      if (dis < (o - p[j]).norm()) {
        dis = (o - p[j]).norm();
        id = j;
      }
    if (j == -1) break;
    o = o + (p[id] - o) * tmp;
    tmp *= 0.98;
  }
}
int main() {
  int T, _ = 0;
  pic c;
  int i;
  while (1 == scanf("%d", &pn) && pn > 0) {
    if (pn > N)
      while (pn > N) i++;
    for (i = 0; i < (pn); i++) p[i].cin();
    c.pn = 0;
    r = -1;
    min_ball(pn, c);
    o.cout(r);
  }
  return 0;
}