#include <bits/stdc++.h>
using namespace std;
const int N = 2010;
int e[N][N], mn, n;
bool vis[N];
long long dis[N];
int main() {
  scanf("%d", &n);
  mn = 1e9;
  for (int i = (0); i <= (n); ++i) dis[i] = 1e18;
  for (int i = (1); i <= (n); ++i)
    for (int j = (i + 1); j <= (n); ++j)
      scanf("%d", &e[i][j]), e[j][i] = e[i][j], mn = min(mn, e[i][j]);
  for (int i = (1); i <= (n); ++i)
    for (int j = (1); j <= (n); ++j)
      if (i ^ j) e[i][j] -= mn, dis[i] = min(dis[i], 2ll * e[i][j]);
  for (int i = (1); i <= (n); ++i) {
    int u = 0;
    for (int j = (1); j <= (n); ++j)
      if (dis[j] < dis[u] && !vis[j]) u = j;
    vis[u] = 1;
    for (int v = (1); v <= (n); ++v)
      if (!vis[v]) dis[v] = min(dis[v], dis[u] + e[u][v]);
  }
  for (int i = (1); i <= (n); ++i)
    printf("%lld\n", dis[i] + 1ll * mn * (n - 1));
  return 0;
}
