#include <bits/stdc++.h>
using namespace std;
const int M = 2005;
void Min(int &x, int y) {
  if (x > y) x = y;
}
int a[M][M], v[M];
int d[M];
int n;
int main() {
  int mi = (int)1e9;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n; j++)
      scanf("%d", &a[i][j]), a[j][i] = a[i][j], Min(mi, a[i][j]);
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n; j++) a[i][j] -= mi, a[j][i] -= mi;
  for (int i = 1; i <= n; i++) {
    d[i] = (int)2e9 + 5;
    for (int j = 1; j <= n; j++)
      if (i != j) Min(d[i], 2 * a[i][j]);
  }
  d[0] = (int)2e9 + 5;
  for (int i = 1; i <= n; i++) {
    int p = 0;
    for (int j = 1; j <= n; j++)
      if (v[j] == 0 && d[j] < d[p]) p = j;
    for (int j = 1; j <= n; j++) Min(d[j], d[p] + a[p][j]);
    v[p] = 1;
  }
  for (int i = 1; i <= n; i++) cout << (long long)mi * (n - 1) + d[i] << endl;
  return 0;
}
