#include <bits/stdc++.h>
#pragma comment(linker, "/stack:16777216")
using namespace std;
const int INF = 1000000000;
const int MAX = 2007;
const int ADD = 500107;
int g[MAX][MAX];
long long d[MAX];
bool U[MAX];
int minOut[MAX];
int main() {
  int n;
  cin >> n;
  int mn = INF + 7;
  int s = -1;
  for (int i = (0); i < (n); ++i) {
    for (int j = (i + 1); j < (n); ++j) {
      scanf("%d", &g[i][j]);
      if (g[i][j] < mn) {
        mn = g[i][j];
        s = i;
      }
    }
  }
  for (int i = (0); i < (n); ++i)
    for (int j = (i + 1); j < (n); ++j) {
      g[i][j] -= mn;
      g[j][i] = g[i][j];
    }
  for (int i = (0); i < (n); ++i) {
    minOut[i] = INF;
    for (int j = (0); j < (n); ++j) {
      if (j == i) continue;
      minOut[i] = min(minOut[i], g[i][j]);
    }
  }
  for (int i = (0); i < (n); ++i) {
    g[i][s] = g[s][i] = min(g[s][i], 2 * minOut[i]);
  }
  for (int i = (0); i < (n); ++i) {
    d[i] = 1LL * INF * INF;
  }
  d[s] = 0;
  for (int it = (0); it < (n); ++it) {
    long long M = 1LL * INF * INF;
    int v = -1;
    for (int i = (0); i < (n); ++i) {
      if (U[i]) continue;
      if (d[i] < M) {
        M = d[i];
        v = i;
      }
    }
    U[v] = 1;
    for (int i = (0); i < (n); ++i) {
      d[i] = min(d[i], d[v] + g[v][i]);
    }
  }
  for (int i = (0); i < (n); ++i) {
    long long res = d[i] + 1LL * (n - 1) * mn;
    cout << res << endl;
  }
  return 0;
}
