#include <bits/stdc++.h>
using namespace std;
const int oo = 0x3f3f3f3f;
const double eps = 1e-9;
long long adj[2048][2048];
long long dist[2048];
long long res[2048];
int main() {
  int N;
  scanf("%d", &N);
  long long mini = oo;
  for (int i = (0); i < (N); i++) {
    adj[i][i] = 0;
    for (int j = (i + 1); j < (N); j++) {
      int a;
      scanf("%d", &a);
      adj[i][j] = adj[j][i] = a;
      mini = min(mini, (long long)a);
    }
  }
  for (int i = (0); i < (N); i++) {
    dist[i] = 2e9;
    for (int j = (0); j < (N); j++)
      if (j != i) dist[i] = min(dist[i], 2 * (adj[i][j] - mini));
  }
  for (int ii = (0); ii < (N); ii++) {
    int n = 0;
    while (dist[n] < 0) ++n;
    for (int i = (n + 1); i < (N); i++)
      if (dist[i] >= 0 && dist[i] < dist[n]) n = i;
    for (int i = (0); i < (N); i++)
      if (i != n) dist[i] = min(dist[i], dist[n] + adj[i][n] - mini);
    res[n] = mini * (N - 1) + dist[n];
    dist[n] = -1;
  }
  for (int i = (0); i < (N); i++) {
    cout << res[i] << endl;
  }
  return 0;
}
