#include <bits/stdc++.h>
using namespace std;
const int N = 2005;
const long long INF = 9999999999ll;
int n;
long long bi[N][N], minv = INF, dp[N], mk[N];
bool vis[N];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++)
    for (int j = i + 1, w; j <= n; j++) {
      scanf("%d", &w);
      bi[i][j] = bi[j][i] = w;
      minv = min(minv, (long long)w);
    }
  for (int i = 1; i <= n; i++) dp[i] = mk[i] = INF;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) {
      if (i == j) continue;
      bi[i][j] -= minv;
      mk[i] = min(mk[i], bi[i][j]);
    }
  for (int i = 1; i <= n; i++) dp[i] = (mk[i] << 1);
  for (int q = 1; q <= n; q++) {
    int mp = -1;
    for (int i = 1; i <= n; i++)
      if (!vis[i] && (mp == -1 || dp[mp] > dp[i])) mp = i;
    vis[mp] = 1;
    for (int i = 1; i <= n; i++) dp[i] = min(dp[i], dp[mp] + bi[mp][i]);
  }
  minv *= (long long)(n - 1);
  for (int i = 1; i <= n; i++) printf("%lld\n", dp[i] + minv);
  return 0;
}
