#include <bits/stdc++.h>
using namespace std;
const int N = 2005;
const int inf = 1000 * 1000 * 1000 + 7;
const long long llinf = 1e18;
int n;
int d[N][N];
long long result[N];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  vector<pair<int, pair<int, int>>> edges;
  for (int i = 0; i < (n - 1); ++i) {
    for (int j = 0; j < (n - i - 1); ++j) {
      cin >> d[i][i + j + 1];
      d[i + j + 1][i] = d[i][i + j + 1];
      edges.push_back({d[i][i + j + 1], {i, i + j + 1}});
    }
  }
  for (int i = 0; i < (n); ++i) result[i] = llinf;
  sort(edges.begin(), edges.end());
  long long mn = edges[0].first;
  int j = 0;
  while (j < (int)(edges).size() && edges[j].first == edges[0].first) {
    result[edges[j].second.first] = (n - 1) * mn;
    result[edges[j].second.second] = (n - 1) * mn;
    ++j;
  }
  for (int i = j; i < (int)(edges).size(); ++i) {
    while (j < (int)(edges).size() && edges[i].first == edges[j].first) {
      int x = edges[j].second.first;
      int y = edges[j].second.second;
      result[x] = min(result[x], 2LL * edges[i].first + (n - 3) * mn);
      result[y] = min(result[y], 2LL * edges[i].first + (n - 3) * mn);
      result[x] = min(result[x], edges[i].first + result[y] - mn);
      result[y] = min(result[y], edges[i].first + result[x] - mn);
      ++j;
    }
  }
  for (int i = 0; i < (n); ++i) {
    cout << result[i] << '\n';
  }
  return 0;
}
