#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e18;
int n, mat[2017][2017], ch[2017];
long long dist[2017], sum[2017];
bool vis[2017];
void dijkstra() {
  int i, j, s, p, q, u;
  long long in, vl;
  for (i = 0; i < n; i++) vis[i] = false;
  for (i = 0; i < n; i++) {
    dist[i] = (long long)(n - 1) * (long long)mat[ch[i]][i];
    sum[i] = mat[ch[i]][i];
  }
  while (true) {
    in = inf;
    for (i = 0; i < n; i++) {
      if (in > dist[i] && !vis[i]) {
        in = dist[i];
        u = i;
      }
    }
    if (in == inf) break;
    vis[u] = true;
    for (i = 0; i < n; i++) {
      if (i == u) continue;
      vl = dist[u] - sum[u] + mat[u][i];
      if (dist[i] > vl) {
        dist[i] = vl;
        sum[i] = sum[u];
      }
      vl = dist[u] - 2 * sum[u] + 2 * mat[ch[i]][i];
      if (dist[i] > vl) {
        dist[i] = vl;
        sum[i] = sum[u];
      }
    }
  }
}
int main() {
  int i, j, s, p, q;
  scanf("%d", &n);
  for (i = 0; i < n; i++)
    for (j = i + 1; j < n; j++) {
      scanf("%d", &mat[i][j]);
      mat[j][i] = mat[i][j];
    }
  for (i = 0; i < n; i++) {
    ch[i] = -1;
    for (j = 0; j < n; j++) {
      if (i == j) continue;
      if (ch[i] < 0 || mat[i][ch[i]] > mat[i][j]) ch[i] = j;
    }
  }
  dijkstra();
  for (i = 0; i < n; i++) printf("%lld\n", dist[i]);
  return 0;
}
