#include <bits/stdc++.h>
using namespace std;
const int maxn = 2000 + 10;
const long long INF = 0x3f3f3f3f3f3f3f3f;
int n, g[maxn][maxn], tag1[maxn], tag2[maxn], S, vis[maxn];
long long dis[maxn];
int main() {
  scanf("%d", &n);
  int Mn = 1e9 + 10;
  memset(g, 0x3f, sizeof(g));
  for (int i = 1; i <= n; i++) {
    for (int j = i + 1; j <= n; j++) {
      scanf("%d", &g[i][j]);
      g[j][i] = g[i][j];
      Mn = min(Mn, g[i][j]);
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j < i; j++) {
      g[i][j] -= Mn;
      g[j][i] = g[i][j];
      if (!g[i][j]) tag1[i] = tag1[j] = 1;
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j < i; j++) {
      tag2[j] |= tag1[i];
      tag2[i] |= tag1[j];
    }
  }
  S = 0;
  for (int i = 1; i <= n; i++) {
    if (tag1[i]) g[S][i] = g[i][S] = 0;
    for (int j = 1; j <= n; j++) {
      if (i == j) continue;
      if (tag2[j]) g[S][i] = g[i][S] = min(g[i][S], 2 * g[i][j]);
    }
  }
  memset(dis, 0x3f, sizeof(dis));
  memset(vis, 0, sizeof(vis));
  dis[0] = 0;
  for (int i = 0; i <= n; i++) {
    int k = -1;
    for (int j = 0; j <= n; j++)
      if (!vis[j] && (k == -1 || dis[j] < dis[k])) k = j;
    vis[k] = 1;
    for (int j = 0; j <= n; j++) {
      dis[j] = min(dis[j], dis[k] + g[k][j]);
    }
  }
  for (int i = 1; i <= n; i++) {
    long long Ans = dis[i] + (long long)Mn * (n - 1);
    printf("%lld\n", Ans);
  }
  return 0;
}
