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