#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0;
  bool f = false;
  char ch = getchar();
  while (!isdigit(ch)) {
    f |= ch == '-';
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = (x << 1) + (x << 3) + ch - 48;
    ch = getchar();
  }
  return f ? -x : x;
}
inline void write(long long x) {
  if (x < 0) putchar('-'), x = -x;
  if (x > 9) write(x / 10);
  putchar(x % 10 + 48);
}
const long long N = 2005, INF = 0x7fffffff;
long long n, a[N][N];
struct node {
  long long w, id;
  inline friend bool operator<(const node x, const node y) { return x.w > y.w; }
};
long long d[N];
bool vis[N];
priority_queue<node> q;
inline void dijkstra(const long long s) {
  memset(d, 0x3f, sizeof(d));
  memset(vis, false, sizeof(vis));
  vis[s] = true;
  for (long long i = 1; i <= n; i++) {
    d[i] = a[s][i];
    for (long long j = 1; j <= n; j++)
      if (i != j) d[i] = min(d[i], a[i][j] << 1);
    q.push((node){d[i], i});
  }
  while (!q.empty()) {
    long long u = q.top().id;
    q.pop();
    if (vis[u]) continue;
    vis[u] = true;
    for (long long v = 1; v <= n; v++) {
      if (v == u) continue;
      if (d[v] > d[u] + a[u][v]) d[v] = d[u] + a[u][v], q.push((node){d[v], v});
    }
  }
}
signed main() {
  n = read();
  for (long long i = 1; i < n; i++)
    for (long long j = i + 1; j <= n; j++) a[j][i] = a[i][j] = read();
  long long minn = INF, s;
  for (long long i = 1; i <= n; i++)
    for (long long j = i + 1; j <= n; j++)
      if (a[i][j] < minn) minn = a[i][j], s = i;
  for (long long i = 1; i <= n; i++)
    for (long long j = i + 1; j <= n; j++) a[j][i] = a[i][j] = a[i][j] - minn;
  dijkstra(s);
  for (long long i = 1; i <= n; i++)
    write(d[i] + minn * (n - 1)), putchar('\n');
  return 0;
}
