#include <bits/stdc++.h>
using namespace std;
const long long inf = (long long)1e18;
const int N = 2010;
int a[N][N];
long long d[N];
bool used[N];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    a[i][i] = 0;
    for (int j = i + 1; j < n; j++) {
      scanf("%d", a[i] + j);
      a[j][i] = a[i][j];
    }
  }
  int min_edge = a[0][1];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (i != j) {
        min_edge = min(min_edge, a[i][j]);
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (i != j) {
        a[i][j] -= min_edge;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    d[i] = inf;
    for (int j = 0; j < n; j++) {
      if (i != j) {
        d[i] = min(d[i], 2LL * a[i][j]);
      }
    }
    used[i] = false;
  }
  for (int it = 0; it < n; it++) {
    long long min_d = inf;
    int ver = -1;
    for (int i = 0; i < n; i++) {
      if (!used[i] && d[i] < min_d) {
        min_d = d[i];
        ver = i;
      }
    }
    used[ver] = true;
    for (int i = 0; i < n; i++) {
      d[i] = min(d[i], d[ver] + a[ver][i]);
    }
  }
  for (int i = 0; i < n; i++) {
    cout << (d[i] + (long long)min_edge * (n - 1)) << endl;
  }
  return 0;
}
