#include <bits/stdc++.h>
using namespace std;
const long long N = 2000;
inline long long read() {
  register long long s = 0;
  register bool neg = 0;
  register char c = getchar();
  for (; c < '0' || c > '9'; c = getchar()) neg |= (c == '-');
  for (; c >= '0' && c <= '9'; s = s * 10 + (c ^ 48), c = getchar())
    ;
  return (neg ? -s : s);
}
long long a, s[N + 10][N + 10], dis[N + 10];
bool vis[N + 10];
inline void dij(long long n) {
  memset(dis, 0x3f, sizeof(dis));
  for (long long i = 1; i <= a; i++) {
    dis[i] = s[n][i];
    for (long long j = 1; j <= a; j++)
      if (i != j) dis[i] = min(dis[i], s[i][j] * 2);
  }
  dis[n] = 0;
  for (long long i = 1; i <= a; i++) {
    long long mx = 0;
    for (long long j = 1; j <= a; j++)
      if (!vis[j] && (dis[j] < dis[mx] || mx == 0)) mx = j;
    vis[mx] = 1;
    for (long long j = 1; j <= a; j++) {
      if (vis[j]) continue;
      if (dis[j] > dis[mx] + s[mx][j]) dis[j] = dis[mx] + s[mx][j];
    }
  }
}
signed main() {
  a = read();
  long long mn = 1e18, p;
  for (long long i = 1; i < a; i++) {
    for (long long j = i + 1; j <= a; j++) {
      s[i][j] = s[j][i] = read();
      if (s[i][j] < mn) {
        mn = s[i][j];
        p = i;
      }
    }
  }
  for (long long i = 1; i <= a; i++)
    for (long long j = i + 1; j <= a; j++) s[i][j] -= mn, s[j][i] -= mn;
  dij(p);
  for (long long i = 1; i <= a; i++) printf("%lld\n", dis[i] + mn * (a - 1));
  return 0;
}
