#include <bits/stdc++.h>
using namespace std;
long long w[2500][2500];
const long long INF = 1e15;
long long mi[2500];
struct e {
  int pos;
  long long val;
  e(int p = 0, long long v = 0) : pos(p), val(v) {}
};
bool operator<(e a, e b) { return a.val > b.val; }
vector<e> ed[2500];
priority_queue<e> pq;
long long dis[2500];
void Dijsktra(int n, int s) {
  for (int i = 0; i <= n; i++) dis[i] = INF;
  dis[s] = 0;
  pq.push(e(s, 0));
  while (!pq.empty()) {
    e E = pq.top();
    pq.pop();
    int u = E.pos;
    if (dis[u] != E.val) continue;
    for (int i = 0; i < ed[u].size(); i++) {
      int v = ed[u][i].pos;
      if (dis[v] > dis[u] + ed[u][i].val) {
        dis[v] = dis[u] + ed[u][i].val;
        pq.push(e(v, dis[v]));
      }
    }
  }
}
int main() {
  int n = 0;
  scanf("%d", &n);
  long long minn = INF;
  for (int i = 1; i <= n; i++) mi[i] = INF;
  for (int i = 1; i < n; i++) {
    for (int j = i + 1; j <= n; j++)
      scanf("%lld", &w[i][j]), minn = min(minn, w[i][j]);
  }
  for (int i = 1; i < n; i++) {
    for (int j = i + 1; j <= n; j++) {
      w[i][j] -= minn;
      mi[i] = min(mi[i], w[i][j]), mi[j] = min(mi[j], w[i][j]);
      ed[i].push_back(e(j, w[i][j])), ed[j].push_back(e(i, w[i][j]));
    }
  }
  for (int i = 1; i <= n; i++) ed[0].push_back(e(i, 2 * mi[i]));
  Dijsktra(n, 0);
  for (int i = 1; i <= n; i++) printf("%lld\n", dis[i] + minn * (n - 1));
  return 0;
}
