#include <bits/stdc++.h>
using namespace std;
long long d[2005];
int vis[2005], n, a[2005][2005];
int main() {
  scanf("%d", &n);
  for (int i = (1); i <= (n); i++)
    for (int j = (i + 1); j <= (n); j++) scanf("%d", &a[i][j]);
  int mn = 2e9;
  for (int i = (1); i <= (n); i++)
    for (int j = (i + 1); j <= (n); j++) mn = min(mn, a[i][j]);
  for (int i = (1); i <= (n); i++)
    for (int j = (i + 1); j <= (n); j++) a[j][i] = (a[i][j] -= mn);
  for (int i = (1); i <= (n); i++) {
    d[i] = 2e15;
    for (int j = (1); j <= (n); j++)
      if (i != j) d[i] = min(d[i], 2ll * a[i][j]);
  }
  for (int i = (1); i <= (n); i++) {
    long long v = 2e15;
    int tmp = -1;
    for (int j = (1); j <= (n); j++)
      if (!vis[j] && d[j] < v) v = d[j], tmp = j;
    vis[tmp] = 1;
    for (int j = (1); j <= (n); j++) d[j] = min(d[j], d[tmp] + a[tmp][j]);
  }
  for (int i = (1); i <= (n); i++) printf("%lld\n", d[i] + 1ll * mn * (n - 1));
}
