#include <bits/stdc++.h>
template <class T>
T Min(const T &a, const T &b) {
  return a < b ? a : b;
}
template <class T>
T Max(const T &a, const T &b) {
  return a > b ? a : b;
}
template <class T>
bool Chkmin(T &a, const T &b) {
  return a > b ? a = b, 1 : 0;
}
template <class T>
bool Chkmax(T &a, const T &b) {
  return a < b ? a = b, 1 : 0;
}
class fast_input {
 private:
  static const int SIZE = 1 << 15 | 1;
  char buf[SIZE], *front, *back;
  void Next(char &c) {
    if (front == back) back = (front = buf) + fread(buf, 1, SIZE, stdin);
    c = front == back ? (char)EOF : *front++;
  }

 public:
  template <class T>
  void operator()(T &x) {
    char c, f = 1;
    for (Next(c); !isdigit(c); Next(c))
      if (c == '-') f = -1;
    for (x = 0; isdigit(c); Next(c)) x = x * 10 + c - '0';
    x *= f;
  }
  void operator()(char &c, char l = 'a', char r = 'z') {
    for (Next(c); c > r || c < l; Next(c))
      ;
  }
} input;
struct edge {
  int u, v, w;
  explicit edge(int u = 0, int v = 0, int w = 0) : u(u), v(v), w(w) {}
  bool operator<(const edge &o) const { return w < o.w; }
};
const int SN = 2000 + 47;
const int SE = SN * SN;
const long long INF = 0x3f3f3f3f3f3f3f3fLL;
edge e[SE];
int n, cnt;
long long ans[SN];
int main() {
  int x, y, z;
  input(n);
  for (int i = (1), i_end = (n); i < i_end; ++i)
    for (int j = (i + 1), j_end = (n); j <= j_end; ++j)
      input(x), e[++cnt] = edge(i, j, x);
  std::sort(e + 1, e + cnt + 1);
  memset(ans, 0x3f, sizeof ans);
  for (int i = (1), i_end = (cnt); i <= i_end; ++i) {
    x = e[i].w;
    Chkmin(ans[e[i].u], ans[e[i].v] + x - e[1].w);
    Chkmin(ans[e[i].v], ans[e[i].u] + x - e[1].w);
    Chkmin(ans[e[i].u], 2 * x + 1LL * (n - 3) * e[1].w);
    Chkmin(ans[e[i].v], 2 * x + 1LL * (n - 3) * e[1].w);
  }
  for (int i = (1), i_end = (n); i <= i_end; ++i)
    printf(
        "%I64d"
        "\n",
        ans[i]);
  return 0;
}
