#include <bits/stdc++.h>
using namespace std;
const int INF = INT_MAX;
int n, a[2001][2001];
int mn = INF;
int dis[2001];
int vis[2001];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    for (int j = i + 1; j <= n; ++j) {
      scanf("%d", &a[i][j]), a[j][i] = a[i][j], mn = min(mn, a[i][j]);
    }
  }
  for (int i = 1; i <= n; ++i) {
    for (int j = i + 1; j <= n; ++j) {
      a[i][j] -= mn, a[j][i] -= mn;
    }
  }
  for (int i = 1; i <= n; ++i) {
    dis[i] = INF;
    for (int j = 1; j <= n; ++j) {
      if (i != j) dis[i] = min(dis[i], a[i][j] << 1);
    }
  }
  dis[0] = INF;
  for (int i = 1; i <= n; ++i) {
    int p = 0;
    for (int j = 1; j <= n; ++j) {
      if (!vis[j] && dis[j] < dis[p]) p = j;
    }
    for (int j = 1; j <= n; ++j) dis[j] = min(dis[j], dis[p] + a[p][j]);
    vis[p] = 1;
  }
  for (int i = 1; i <= n; ++i) {
    printf("%lld\n", (n - 1) * 1LL * mn + dis[i]);
  }
}
