#include <bits/stdc++.h>
const long long N = 2e3 + 10;
struct Node {
  long long x, y, val;
} E[N * N];
long long n, m, ans[N], cnt, x;
inline long long read() {
  long long x = 0, k = 1;
  char c = getchar();
  for (; c < 48 || c > 57; c = getchar()) k ^= (c == '-');
  for (; c >= 48 && c <= 57; c = getchar()) x = x * 10 + (c ^ 48);
  return k ? x : -x;
}
inline bool cmp(Node x, Node y) {
  if (x.val == y.val && x.x == y.x)
    return x.y < y.y;
  else if (x.val == y.val)
    return x.x < y.x;
  else
    return x.val < y.val;
}
signed main() {
  n = read();
  std::fill(ans + 1, ans + 1 + n, 1e18);
  for (long long i = 1; i <= n; i++) {
    for (long long j = i + 1; j <= n; j++) {
      x = read();
      E[++cnt].val = x, E[cnt].x = i, E[cnt].y = j;
    }
  }
  std::sort(E + 1, E + 1 + cnt, cmp);
  for (long long i = 1; i <= cnt; i++) {
    x = E[i].val * 2 + E[1].val * (n - 3);
    ans[E[i].x] =
        std::min(ans[E[i].x], std::min(ans[E[i].y] - E[1].val + E[i].val, x));
    ans[E[i].y] =
        std::min(ans[E[i].y], std::min(ans[E[i].x] - E[1].val + E[i].val, x));
  }
  for (long long i = 1; i <= n; i++) printf("%lld\n", ans[i]);
  return 0;
}
