#include <bits/stdc++.h>
using namespace std;
const int MX = 2e3 + 10, INF = 1e9 + 10;
long long int w[MX][MX];
long long int c = INF;
set<pair<long long int, int> > s;
long long int dis[MX];
bool sabet[MX];
int main() {
  ios::sync_with_stdio(0);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    for (int j = i + 1; j <= n; j++) {
      long long int k;
      cin >> k;
      w[i][j] = k;
      w[j][i] = k;
      c = min(c, k);
    }
  }
  for (int i = 1; i <= n; i++) {
    long long int mini = INF;
    for (int j = 1; j <= n; j++) {
      if (i == j) continue;
      w[i][j] -= c;
      mini = min(mini, w[i][j]);
    }
    dis[i] = INF;
    dis[i] = min(dis[i], 2 * mini);
    s.insert(make_pair(dis[i], i));
  }
  while (s.size()) {
    auto it = s.begin();
    int v = it->second;
    sabet[v] = 1;
    s.erase(s.begin());
    for (int u = 1; u <= n; u++) {
      if (u == v) continue;
      if (!sabet[u]) {
        pair<long long int, int> q = make_pair(dis[u], u);
        s.erase(q);
        dis[u] = min(dis[u], dis[v] + w[v][u]);
        s.insert(make_pair(dis[u], u));
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    cout << dis[i] + (n - 1) * c << endl;
  }
}
