#include <bits/stdc++.h>
using namespace std;
const long long N = 2e3 + 5, oo = 1e18;
long long n, d[N], a[N][N];
bool used[N];
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  long long minW = oo;
  for (long long i = 1; i <= n; ++i) {
    for (long long j = i + 1; j <= n; ++j) {
      cin >> a[i][j];
      a[j][i] = a[i][j];
      minW = min(minW, a[i][j]);
    }
  }
  for (long long i = 1; i <= n; ++i) {
    for (long long j = 1; j <= n; ++j)
      if (i != j) {
        a[i][j] -= minW;
      }
  }
  for (long long i = 1; i <= n; ++i) d[i] = oo;
  for (long long i = 1; i <= n; ++i) {
    for (long long j = 1; j <= n; ++j)
      if (i != j) {
        d[i] = min(d[i], 2 * a[i][j]);
      }
  }
  for (long long t = 0; t < n; ++t) {
    pair<long long, long long> mi(oo, oo);
    for (long long i = 1; i <= n; ++i)
      if (!used[i]) mi = min(mi, pair<long long, long long>(d[i], i));
    long long u = mi.second, w = mi.first;
    used[u] = 1;
    for (long long v = 1; v <= n; ++v)
      if (v != u) {
        d[v] = min(d[v], w + a[u][v]);
      }
  }
  for (long long i = 1; i <= n; ++i) {
    cout << d[i] + minW * (n - 1) << '\n';
  }
  return 0;
}
