#include <bits/stdc++.h>
using namespace std;
const long long N = 5e3 + 10, I = 1e9;
long long n, m, k, d[N], b[N][N], d1, d2, mn = I, mn1, v[N], x, da[N];
signed main() {
  scanf("%lld", &n);
  for (long long i = (1); i <= (n - 1); i++) {
    for (long long j = (i + 1); j <= (n); j++) {
      scanf("%lld", &b[i][j]), b[j][i] = b[i][j];
      if (b[i][j] < mn) mn = b[i][j], d1 = i, d2 = j;
    }
  }
  for (long long i = (1); i <= (n); i++)
    for (long long j = (1); j <= (n); j++)
      if (i != j) b[i][j] -= mn;
  for (long long i = (1); i <= (n); i++) d[i] = b[d1][i];
  for (long long i = (1); i <= (n); i++)
    for (long long j = (1); j <= (n); j++)
      if (i != j) d[i] = min(b[i][j] * 2, d[i]);
  x = d1;
  d[0] = I;
  memset(v, 0, sizeof(v));
  while (x) {
    if (v[x]++) continue;
    mn1 = I;
    for (long long i = (1); i <= (n); i++)
      if (!v[i]) d[i] = min(d[i], d[x] + b[i][x]);
    x = 0;
    for (long long i = (1); i <= (n); i++)
      if (!v[i] && d[i] < d[x]) x = i;
  }
  for (long long i = (1); i <= (n); i++) da[i] = d[i];
  for (long long i = (1); i <= (n); i++) d[i] = b[d2][i];
  for (long long i = (1); i <= (n); i++)
    for (long long j = (1); j <= (n); j++)
      if (i != j) d[i] = min(b[i][j] * 2, d[i]);
  x = d2;
  d[0] = I;
  memset(v, 0, sizeof(v));
  while (x) {
    if (v[x]++) continue;
    mn1 = I;
    for (long long i = (1); i <= (n); i++)
      if (!v[i]) d[i] = min(d[i], d[x] + b[i][x]);
    x = 0;
    for (long long i = (1); i <= (n); i++)
      if (!v[i] && d[i] < d[x]) x = i;
  }
  for (long long i = (1); i <= (n); i++)
    printf("%lld\n", mn * (n - 1) + min(d[i], da[i]));
  return 0;
}
