#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0, w = 0;
  char ch = getchar();
  while (!isdigit(ch)) w |= ch == '-', ch = getchar();
  while (isdigit(ch)) x = (x << 1) + (x << 3) + ch - '0', ch = getchar();
  return w ? -x : x;
}
long long s, n, a[3005][3005], mn = 21000000000000, dis[400000], vis[400000];
void dijkstra(long long s) {
  memset(dis, 0x3f, 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; ++i) {
    long long mn = 210000000000000, k = 0;
    for (long long j = 1; j <= n; ++j)
      if (!vis[j] && mn > dis[j]) mn = dis[j], k = j;
    vis[k] = 1;
    for (long long j = 1; j <= n; ++j)
      if (!vis[j] && dis[j] > dis[k] + a[k][j]) dis[j] = dis[k] + a[k][j];
  }
}
signed main() {
  n = read();
  for (long long i = 1; i < n; ++i)
    for (long long j = i + 1; j <= n; ++j) {
      a[i][j] = a[j][i] = read();
      if (mn > a[i][j]) {
        mn = a[i][j];
        s = i;
      }
    }
  for (long long i = 1; i < n; ++i)
    for (long long j = i + 1; j <= n; ++j) a[i][j] = a[j][i] = a[i][j] - mn;
  dijkstra(s);
  for (long long i = 1; i <= n; ++i) printf("%lld ", dis[i] + mn * (n - 1));
}
