#include <bits/stdc++.h>
using namespace std;
const int N = 2005;
int n, c[N][N], d[N];
bool vis[N];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n;
  int mn = 1e9;
  for (int i = 1; i <= n; i++) {
    for (int j = i + 1; j <= n; j++) {
      cin >> c[i][j];
      c[j][i] = c[i][j];
      mn = min(mn, c[i][j]);
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) c[i][j] -= mn;
  }
  for (int i = 1; i <= n; i++) {
    d[i] = 1e9;
    for (int j = 1; j <= n; j++)
      if (i != j) d[i] = min(d[i], c[i][j] * 2);
  }
  for (int rep = 1; rep <= n; rep++) {
    int j = -1;
    for (int i = 1; i <= n; i++) {
      if (!vis[i]) {
        if (j == -1 || d[i] < d[j]) j = i;
      }
    }
    vis[j] = true;
    for (int i = 1; i <= n; i++) {
      if (i == j) continue;
      if (d[i] > d[j] + c[i][j]) d[i] = d[j] + c[i][j];
    }
  }
  for (int i = 1; i <= n; i++) cout << 1ll * (n - 1) * mn + d[i] << '\n';
}
