#include <bits/stdc++.h>
using namespace std;
long long n, f[3005][3005], vis[3005], dis[3005];
inline long long read() {
  long long ret = 0, ff = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') ff = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    ret = (ret << 3) + (ret << 1) + (ch ^ 48);
    ch = getchar();
  }
  return ret * ff;
}
inline void write(long long x) {
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  if (x > 9) write(x / 10);
  putchar(x % 10 + 48);
}
void dij(long long st) {
  memset(vis, 0, sizeof(vis));
  memset(dis, 0x7f, sizeof(dis));
  for (long long i = 1; i <= n; i++) {
    dis[i] = f[st][i];
    for (long long j = 1; j <= n; j++)
      if (i != j) dis[i] = min(dis[i], f[i][j] * 2);
  }
  vis[st] = 1;
  for (long long i = 1; i <= n - 1; i++) {
    long long minn = 2e9 + 1, k;
    for (long long j = 1; j <= n; j++)
      if (!vis[j] && dis[j] < minn) {
        minn = dis[j];
        k = j;
      }
    vis[k] = 1;
    for (long long j = 1; j <= n; j++)
      if (!vis[j]) dis[j] = min(dis[j], dis[k] + f[j][k]);
  }
}
signed main() {
  long long minn = 2e9 + 1, k;
  n = read();
  for (long long i = 1; i <= n - 1; i++)
    for (long long j = 1; j <= n - i; j++) {
      f[i][i + j] = f[i + j][i] = read();
      if (f[i][i + j] < minn) {
        minn = f[i][i + j];
        k = i;
      }
    }
  for (long long i = 1; i <= n - 1; i++)
    for (long long j = 1; j <= n - i; j++) {
      f[i][i + j] -= minn;
      f[i + j][i] = f[i][i + j];
    }
  dij(k);
  for (long long i = 1; i <= n; i++) printf("%lld\n", dis[i] + minn * (n - 1));
  return 0;
}
