#include <bits/stdc++.h>
using namespace std;
const int N = 5005;
long long n;
long long a[N][N];
long long d[N];
bool vis[N];
inline long long read() {
  long long x = 0, f = 1;
  char s = getchar();
  while (!isdigit(s)) {
    if (s == '-') f = -1;
    s = getchar();
  }
  while (isdigit(s)) {
    x = (x << 1) + (x << 3) + (s ^ 48);
    s = getchar();
  }
  return x * f;
}
void write(long long x) {
  if (x < 0) putchar('-'), x = -x;
  if (x >= 10) write(x / 10);
  putchar(x % 10 | '0');
}
void Dijkstra(int s) {
  for (int i = 1; i <= n; i++) {
    d[i] = a[i][s];
    for (int j = 1; j <= n; j++)
      if (i ^ j) {
        d[i] = min(d[i], a[i][j] * 2);
      }
  }
  d[0] = 0x7fffffff;
  vis[s] = true;
  for (int i = 1; i <= n - 1; i++) {
    int id = 0;
    for (int j = 1; j <= n; j++) {
      if (!vis[j] && d[j] < d[id]) id = j;
    }
    vis[id] = true;
    for (int j = 1; j <= n; j++) {
      if (!vis[j] && d[j] > d[id] + a[id][j]) {
        d[j] = d[id] + a[id][j];
      }
    }
  }
}
int main() {
  int minn = 0x7fffffff;
  n = read();
  int s = 0;
  for (int i = 1; i <= n - 1; i++)
    for (int j = i + 1; j <= n; j++) {
      a[i][j] = a[j][i] = read();
      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++) write(minn * (n - 1) + d[i]), puts("");
  return 0;
}
