#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline bool upmin(T &x, T y) {
  return y < x ? x = y, 1 : 0;
}
template <typename T>
inline bool upmax(T &x, T y) {
  return x < y ? x = y, 1 : 0;
}
const long double eps = 1e-11;
const long double pi = acos(-1);
const long long oo = 1 << 30;
const long long loo = 1ll << 62;
const long long mods = 998244353;
const long long MAXN = 2005;
const long long INF = 0x3f3f3f3f;
inline long long read() {
  long long f = 1, x = 0;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = (x << 3) + (x << 1) + (c ^ 48);
    c = getchar();
  }
  return x * f;
}
priority_queue<pair<long long, long long> > que;
long long a[MAXN][MAXN], dist[MAXN], vis[MAXN];
signed main() {
  long long n = read(), mn = loo, id = 0;
  for (long long i = 1; i <= n; i++)
    for (long long j = i + 1; j <= n; j++) {
      a[i][j] = a[j][i] = read();
      if (a[i][j] < mn) mn = a[i][j], id = i;
    }
  for (long long i = 1; i <= n; i++)
    dist[i] = (id == i ? 0 : a[id][i] - mn), vis[i] = 0;
  for (long long i = 1; i <= n; i++)
    for (long long j = i + 1; j <= n; j++)
      a[i][j] -= mn, a[j][i] -= mn, upmin(dist[i], a[i][j] * 2),
          upmin(dist[j], a[i][j] * 2);
  for (long long i = 1; i <= n; i++) que.push(make_pair(-dist[i], i));
  while (!que.empty()) {
    long long q = que.top().second;
    que.pop();
    if (vis[q]) continue;
    vis[q] = 1;
    for (long long i = 1; i <= n; i++)
      if (!vis[i] && dist[q] + a[q][i] < dist[i])
        dist[i] = dist[q] + a[q][i], que.push(make_pair(-dist[i], i));
  }
  for (long long i = 1; i <= n; i++) printf("%lld\n", dist[i] + mn * (n - 1));
  return 0;
}
