#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int mps[2010][2010], n, mie, sign[2010], dis[2010];
int main() {
  n = read();
  mie = 0x3fffffff;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n - i; j++) mps[i][j + i] = mps[j + i][i] = read();
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++)
      if (i != j) mie = min(mie, mps[i][j]);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++)
      if (i != j) mps[i][j] -= mie;
  for (int i = 1; i <= n; i++) {
    dis[i] = 0x3fffffff;
    for (int j = 1; j <= n; j++)
      if (i != j) dis[i] = min(dis[i], mps[i][j] * 2);
  }
  dis[0] = 0x3fffffff;
  for (int i = 1; i <= n; i++) {
    int vtx = 0;
    for (int j = 1; j <= n; j++)
      if (!sign[j] && dis[j] < dis[vtx]) vtx = j;
    sign[vtx] = 1;
    for (int j = 1; j <= n; j++)
      if (vtx != j) dis[j] = min(dis[j], dis[vtx] + mps[vtx][j]);
  }
  for (int i = 1; i <= n; i++)
    printf("%lld\n", 1ll * dis[i] + 1ll * (n - 1) * mie);
  return 0;
}
