#include <bits/stdc++.h>
inline long long rd() {
  long long f = 1, x = 0;
  char s = getchar();
  while (!isdigit(s)) {
    if (s == '-') f = -1;
    s = getchar();
  }
  while (isdigit(s)) {
    x = (x << 1) + (x << 3) + (s ^ 48);
    s = getchar();
  }
  return x * f;
}
inline void wrt(long long x) {
  if (x < 0) putchar('-'), x = ~x + 1;
  if (x > 9) wrt(x / 10);
  putchar(x % 10 ^ 48);
  return;
}
using namespace std;
long long n, minn, m, s;
const long long N = 3010;
long long a[N][N], dis[N], vis[N];
inline void Dijkstra(long long s) {
  memset(dis, 60, sizeof(dis));
  for (long long i = 1; i <= n; ++i) {
    dis[i] = a[s][i];
    for (long long j = 1; j <= n; ++j)
      if (i != j) dis[i] = min(dis[i], a[i][j] * 2);
  }
  vis[s] = 1;
  for (long long i = 1; i <= n - 1; ++i) {
    long long x = 0;
    for (long long j = 1; j <= n; ++j)
      if (!vis[j] && (x == 0 || dis[x] > dis[j])) x = j;
    vis[x] = 1;
    for (long long j = 1; j <= n; ++j)
      if (!vis[j]) dis[j] = min(dis[j], dis[x] + a[x][j]);
  }
}
signed main() {
  n = rd();
  minn = 1e9;
  for (long long i = 1; i <= n; ++i)
    for (long long j = 1; i + j <= n; ++j) {
      long long v = rd();
      a[i][i + j] = v;
      a[i + j][i] = v;
      if (minn > v) minn = v, s = i;
    }
  for (long long i = 1; i <= n - 1; ++i)
    for (long long j = i + 1; j <= n; ++j) {
      a[i][j] -= minn;
      a[j][i] -= minn;
    }
  Dijkstra(s);
  for (long long i = 1; i <= n; ++i) wrt(dis[i] + minn * (n - 1)), putchar(' ');
  putchar('\n');
  return 0;
}
