#include <bits/stdc++.h>
#pragma GCC optimize(2)
char gc() {
  static char buf[1 << 20], *p1 = buf, *p2 = buf;
  if (p1 == p2) {
    p2 = (p1 = buf) + fread(buf, 1, 1 << 20, stdin);
    if (p1 == p2) return EOF;
  }
  return *p1++;
}
template <typename _Tp>
_Tp read(_Tp& x) {
  x = 0;
  char c = gc();
  while (c < '0' || c > '9') c = gc();
  while (c >= '0' && c <= '9') x = (x << 1) + (x << 3) + (c ^ 48), c = gc();
  return x;
}
using namespace std;
long long n, s, ans, minn, a[5005][5005], dis[5005];
bool vis[5005];
inline void dijkstra(int s) {
  memset(vis, 0, sizeof(vis));
  memset(dis, 0x7f, sizeof(dis));
  for (int i = 1; i <= n; i++) {
    dis[i] = a[s][i];
    for (int j = 1; j <= n; j++) {
      if (i != j) dis[i] = min(dis[i], a[i][j] * 2);
    }
  }
  vis[s] = 1;
  for (int i = 1; i <= n - 1; i++) {
    long long minn = ~(1LL << 63), v;
    for (int j = 1; j <= n; j++) {
      if (!vis[j] && dis[j] < minn) {
        minn = dis[j];
        v = j;
      }
    }
    vis[v] = true;
    for (int j = 1; j <= n; j++) {
      if (!vis[j]) {
        dis[j] = min(dis[j], dis[v] + a[v][j]);
      }
    }
  }
}
int main() {
  read(n);
  minn = 0x7fffffffffffffff;
  for (int i = 1; i <= n - 1; i++) {
    for (int j = i + 1; j <= n; j++) {
      read(a[i][j]);
      a[j][i] = a[i][j];
      if (a[i][j] < minn) minn = a[i][j], s = i;
    }
  }
  for (int i = 1; i <= n - 1; i++) {
    for (int j = i + 1; j <= n; j++) {
      a[i][j] -= minn;
      a[j][i] = a[i][j];
    }
  }
  dijkstra(s);
  for (int i = 1; i <= n; i++) {
    printf("%lld ", dis[i] + minn * (n - 1));
  }
}
