#include <bits/stdc++.h>
using namespace std;
template <class T>
void read(T &x) {
  x = 0;
  char c = getchar();
  int flag = 0;
  while (c < '0' || c > '9') flag |= (c == '-'), c = getchar();
  while (c >= '0' && c <= '9')
    x = (x << 3) + (x << 1) + (c ^ 48), c = getchar();
  if (flag) x = -x;
}
template <class T>
T _max(T a, T b) {
  return b > a ? b : a;
}
template <class T>
T _min(T a, T b) {
  return b < a ? b : a;
}
template <class T>
bool checkmax(T &a, T b) {
  return b > a ? a = b, 1 : 0;
}
template <class T>
bool checkmin(T &a, T b) {
  return b < a ? a = b, 1 : 0;
}
const int N = 2005;
const long long inf = 1000000000000000;
int n;
int a[N][N];
long long Min_edge = inf, dis[N];
int vis[N];
void init() {
  read(n);
  for (int i = 1; i <= n; ++i) {
    for (int j = i + 1; j <= n; ++j) {
      read(a[i][j]);
      a[j][i] = a[i][j];
      checkmin(Min_edge, (long long)a[i][j]);
    }
  }
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= n; ++j)
      if (i != j) {
        a[i][j] -= Min_edge;
      }
  }
}
void solve() {
  for (int i = 1; i <= n; ++i) {
    dis[i] = inf;
    for (int j = 1; j <= n; ++j)
      if (i != j) checkmin(dis[i], (long long)a[i][j] << 1);
  }
  for (int i = 1; i <= n; ++i) {
    long long Min = inf;
    int pos = -1;
    for (int j = 1; j <= n; ++j) {
      if (!vis[j] && checkmin(Min, dis[j])) pos = j;
    }
    if (pos == -1) break;
    vis[pos] = 1;
    for (int j = 1; j <= n; ++j) {
      if (vis[j]) continue;
      checkmin(dis[j], dis[pos] + a[pos][j]);
    }
  }
  for (int i = 1; i <= n; ++i) printf("%lld\n", dis[i] + (n - 1) * Min_edge);
}
int main() {
  init();
  solve();
  return 0;
}
