#include <bits/stdc++.h>
using namespace std;
const int N = 2010, INF = 1e9;
const long long INF_ll = 1e16;
int n, g[N][N], p, check[N];
long long dis[N];
void Dijkstra() {
  for (register int i = 1; i <= n; ++i) {
    dis[i] = g[p][i];
    for (register int j = 1; j <= n; ++j)
      if (i != j) dis[i] = min(dis[i], 2ll * g[j][i]);
  }
  for (register int i = 1; i <= n; ++i) {
    long long minv = INF_ll;
    int k;
    for (register int j = 1; j <= n; ++j)
      if (!check[j] && dis[j] < minv) minv = dis[j], k = j;
    check[k] = 1;
    for (register int j = 1; j <= n; ++j)
      if (!check[j]) dis[j] = min(dis[j], dis[k] + g[k][j]);
  }
}
int main() {
  scanf("%d", &n);
  int minw = INF;
  for (register int i = 1; i <= n - 1; ++i)
    for (register int j = 1; j <= n - i; ++j) {
      scanf("%d", &g[i][i + j]);
      g[i + j][i] = g[i][i + j];
      if (g[i][i + j] < minw) minw = g[i][i + j], p = i;
    }
  for (register int i = 1; i <= n; ++i)
    for (register int j = 1; j <= n; ++j)
      if (i != j) g[i][j] -= minw;
  Dijkstra();
  for (register int i = 1; i <= n; ++i)
    printf("%lld\n", dis[i] + 1ll * (n - 1) * minw);
  return 0;
}
