#include <bits/stdc++.h>
std::priority_queue<std::pair<long long, int> > que;
long long dis[2005];
int w[2005][2005];
int main() {
  int n, mn = 1e9;
  scanf("%d", &n);
  for (int i = 0; i < n - 1; i++) {
    for (int j = 1; j < n - i; j++) {
      int x;
      scanf("%d", &x);
      w[i][i + j] = w[i + j][i] = x;
      mn = std::min(mn, x);
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (i != j) w[i][j] -= mn;
    }
  }
  for (int i = 0; i < n; i++) {
    dis[i] = 1e18;
    for (int j = 0; j < n; j++) {
      if (i != j) dis[i] = std::min(dis[i], (long long)w[i][j] << 1);
    }
    que.push(std::make_pair(-dis[i], i));
  }
  while (!que.empty()) {
    long long d = -que.top().first;
    int u = que.top().second;
    que.pop();
    if (dis[u] != d) continue;
    for (int v = 0; v < n; v++) {
      if (u != v && d + w[u][v] < dis[v]) {
        dis[v] = d + w[u][v];
        que.push(std::make_pair(-dis[v], v));
      }
    }
  }
  for (int i = 0; i < n; i++)
    printf("%lld\n", (long long)(n - 1) * mn + dis[i]);
  return 0;
}
