#include <bits/stdc++.h>
using namespace std;
const int N = 2010;
int n, cnt;
long long ans[N];
struct pos {
  int u, v;
  long long w;
  bool operator<(const pos x) const { return w < x.w; }
} e[N * N];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n; j++) {
      scanf("%lld", &e[++cnt].w);
      e[cnt].u = i, e[cnt].v = j;
    }
  memset(ans, 0x3f, sizeof(ans));
  sort(e + 1, e + cnt + 1);
  for (int i = 1; i <= cnt; i++) {
    long long tmp = 1ll * (n - 3) * e[1].w + 2 * e[i].w;
    int x = e[i].u, y = e[i].v;
    ans[x] = min(ans[x], min(tmp, ans[y] - e[1].w + e[i].w));
    ans[y] = min(ans[y], min(tmp, ans[x] - e[1].w + e[i].w));
  }
  for (int i = 1; i <= n; i++) printf("%lld\n", ans[i]);
  return 0;
}
