#include <bits/stdc++.h>
using namespace std;
const int MaxN = 2005;
const long long Inf = (1LL << 62);
int n;
long long minEdge = Inf;
long long dist[MaxN];
int graph[MaxN][MaxN];
bool used[MaxN];
void Dijkstra() {
  for (int i = 1; i <= n; ++i) {
    dist[i] = Inf;
    for (int j = 1; j <= n; ++j) {
      if (i == j) {
        continue;
      }
      dist[i] = min(dist[i], 2LL * graph[i][j]);
    }
  }
  for (int iterations = 1; iterations <= n; ++iterations) {
    int currNode = 0;
    long long bestDist = Inf;
    for (int i = 1; i <= n; ++i) {
      if (used[i]) {
        continue;
      }
      if (dist[i] < bestDist) {
        bestDist = dist[i];
        currNode = i;
      }
    }
    used[currNode] = true;
    for (int i = 1; i <= n; ++i) {
      dist[i] = min(dist[i], dist[currNode] + graph[currNode][i]);
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 1; i <= n - 1; ++i) {
    for (int j = i + 1; j <= n; ++j) {
      cin >> graph[i][j];
      graph[j][i] = graph[i][j];
      minEdge = min(minEdge, 1LL * graph[i][j]);
    }
  }
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= n; ++j) {
      if (i == j) {
        continue;
      }
      graph[i][j] -= minEdge;
    }
  }
  Dijkstra();
  for (int i = 1; i <= n; ++i) {
    cout << dist[i] + (n - 1) * minEdge << '\n';
  }
  return 0;
}
