#pragma GCC optimize ("Ofast")
#include<bits/stdc++.h>
using namespace std;
void *wmem;
char memarr[96000000];
template<class S, class T> inline S min_L(S a,T b){
  return a<=b?a:b;
}
template<class T> inline void walloc1d(T **arr, int x, void **mem = &wmem){
  static int skip[16] = {0, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1};
  (*mem) = (void*)( ((char*)(*mem)) + skip[((unsigned long long)(*mem)) & 15] );
  (*arr)=(T*)(*mem);
  (*mem)=((*arr)+x);
}
template<class T1, class T2> void sortA_L(int N, T1 a[], T2 b[], void *mem = wmem){
  int i;
  pair<T1, T2> *arr;
  walloc1d(&arr, N, &mem);
  for(i=(0);i<(N);i++){
    arr[i].first = a[i];
    arr[i].second = b[i];
  }
  sort(arr, arr+N);
  for(i=(0);i<(N);i++){
    a[i] = arr[i].first;
    b[i] = arr[i].second;
  }
}
template<class T1, class T2, class T3> void sortA_L(int N, T1 a[], T2 b[], T3 c[], void *mem = wmem){
  int i;
  pair<T1, pair<T2, T3> > *arr;
  walloc1d(&arr, N, &mem);
  for(i=(0);i<(N);i++){
    arr[i].first = a[i];
    arr[i].second.first = b[i];
    arr[i].second.second = c[i];
  }
  sort(arr, arr+N);
  for(i=(0);i<(N);i++){
    a[i] = arr[i].first;
    b[i] = arr[i].second.first;
    c[i] = arr[i].second.second;
  }
}
inline int my_getchar_unlocked(){
  static char buf[1048576];
  static int s = 1048576;
  static int e = 1048576;
  if(s == e && e == 1048576){
    e = fread_unlocked(buf, 1, 1048576, stdin);
    s = 0;
  }
  if(s == e){
    return EOF;
  }
  return buf[s++];
}
inline void rd(int &x){
  int k;
  int m=0;
  x=0;
  for(;;){
    k = my_getchar_unlocked();
    if(k=='-'){
      m=1;
      break;
    }
    if('0'<=k&&k<='9'){
      x=k-'0';
      break;
    }
  }
  for(;;){
    k = my_getchar_unlocked();
    if(k<'0'||k>'9'){
      break;
    }
    x=x*10+k-'0';
  }
  if(m){
    x=-x;
  }
}
inline void rd(long long &x){
  int k;
  int m=0;
  x=0;
  for(;;){
    k = my_getchar_unlocked();
    if(k=='-'){
      m=1;
      break;
    }
    if('0'<=k&&k<='9'){
      x=k-'0';
      break;
    }
  }
  for(;;){
    k = my_getchar_unlocked();
    if(k<'0'||k>'9'){
      break;
    }
    x=x*10+k-'0';
  }
  if(m){
    x=-x;
  }
}
struct MY_WRITER{
  char buf[1048576];
  int s;
  int e;
  MY_WRITER(){
    s = 0;
    e = 1048576;
  }
  ~MY_WRITER(){
    if(s){
      fwrite_unlocked(buf, 1, s, stdout);
    }
  }
}
;
MY_WRITER MY_WRITER_VAR;
void my_putchar_unlocked(int a){
  if(MY_WRITER_VAR.s == MY_WRITER_VAR.e){
    fwrite_unlocked(MY_WRITER_VAR.buf, 1, MY_WRITER_VAR.s, stdout);
    MY_WRITER_VAR.s = 0;
  }
  MY_WRITER_VAR.buf[MY_WRITER_VAR.s++] = a;
}
inline void wt_L(char a){
  my_putchar_unlocked(a);
}
inline void wt_L(long long x){
  int s=0;
  int m=0;
  char f[20];
  if(x<0){
    m=1;
    x=-x;
  }
  while(x){
    f[s++]=x%10;
    x/=10;
  }
  if(!s){
    f[s++]=0;
  }
  if(m){
    my_putchar_unlocked('-');
  }
  while(s--){
    my_putchar_unlocked(f[s]+'0');
  }
}
inline int BIT_popcount_L(const int x){
  return __builtin_popcount(x);
}
inline int BIT_popcount_L(const long long x){
  return __builtin_popcountll(x);
}
template<class S, class T> inline S chmin(S &a, T b){
  if(a>b){
    a=b;
  }
  return a;
}
int N;
long long X[15];
long long Y[15];
long long P[15];
long long res[16];
long long mn[15];
long long yy[15];
long long pp[15];
long long dp[16][16];
long long cost[16][16];
long long sm[16];
void solve(int add){
  int i, k;
  long long tmp;
  for(i=(0);i<(N);i++){
    yy[i] = Y[i];
    pp[i] = P[i];
  }
  sortA_L(N, yy, mn, pp);
  for(i=(0);i<(N+1);i++){
    int j;
    for(j=(0);j<(N+1);j++){
      dp[i][j] = 4611686016279904256LL;
    }
  }
  for(i=(0);i<(N+1);i++){
    dp[i][0] = 0;
  }
  for(i=(0);i<(N+1);i++){
    int j;
    for(j=(0);j<(N+1);j++){
      cost[i][j] = 4611686016279904256LL;
    }
  }
  for(k=(0);k<(N);k++){
    sm[0] = 0;
    for(i=(0);i<(N);i++){
      sm[i+1] = sm[i] +min_L(min_L(mn[i], abs(yy[i] - yy[k])), abs(yy[i]))* pp[i];
    }
    for(i=(0);i<(N);i++){
      int j;
      for(j=(i);j<(N);j++){
        chmin(cost[i][j], sm[j+1] - sm[i]);
      }
    }
  }
  for(k=(0);k<(N);k++){
    for(i=(0);i<(N);i++){
      int j;
      for(j=(i);j<(N);j++){
        chmin(dp[k+1][j+1], dp[k][i] + cost[i][j]);
      }
    }
  }
  for(i=(0);i<(N+1);i++){
    if(i+add <= N){
      chmin(res[i+add], dp[i][N]);
    }
  }
  tmp = 0;
  for(i=(0);i<(N);i++){
    tmp +=min_L(mn[i], abs(yy[i]))* pp[i];
  }
  chmin(res[add], tmp);
}
int main(){
  int i, mask;
  wmem = memarr;
  rd(N);
  {
    int aTqQ6rt8;
    for(aTqQ6rt8=(0);aTqQ6rt8<(N);aTqQ6rt8++){
      rd(X[aTqQ6rt8]);
      rd(Y[aTqQ6rt8]);
      rd(P[aTqQ6rt8]);
    }
  }
  for(i=(0);i<(N+1);i++){
    res[i] = 4611686016279904256LL;
  }
  for(mask=(0);mask<(1<<N);mask++){
    for(i=(0);i<(N);i++){
      mn[i] = abs(X[i]);
    }
    for(i=(0);i<(N);i++){
      int j;
      for(j=(0);j<(N);j++){
        if(((mask) &(1<<(j)))){
          chmin(mn[i], abs(X[i]-X[j]));
        }
      }
    }
    solve(BIT_popcount_L(mask));
  }
  for(i=(0);i<(N+1);i++){
    wt_L(res[i]);
    wt_L('\n');
  }
  return 0;
}
// cLay varsion 20200509-1

// --- original code ---
// int N;
// ll X[15], Y[15], P[15];
// ll res[16];
// 
// ll mn[15], yy[15], pp[15];
// ll dp[16][16], cost[16][16], sm[16];
// 
// void solve(int add){
//   ll tmp;
//   rep(i,N) yy[i] = Y[i], pp[i] = P[i];
//   sortA(N, yy, mn, pp);
// 
//   rep(i,N+1) rep(j,N+1) dp[i][j] = ll_inf;
//   rep(i,N+1) dp[i][0] = 0;
// 
//   rep(i,N+1) rep(j,N+1) cost[i][j] = ll_inf;
//   rep(k,N){
//     sm[0] = 0;
//     rep(i,N) sm[i+1] = sm[i] + min(mn[i], abs(yy[i] - yy[k]), abs(yy[i])) * pp[i];
//     rep(i,N) rep(j,i,N) cost[i][j] <?= sm[j+1] - sm[i];
//   }
// 
//   rep(k,N) rep(i,N) rep(j,i,N) dp[k+1][j+1] <?= dp[k][i] + cost[i][j];
//   rep(i,N+1) if(i+add <= N) res[i+add] <?= dp[i][N];
// 
//   tmp = 0;
//   rep(i,N) tmp += min(mn[i], abs(yy[i])) * pp[i];
//   res[add] <?= tmp;
// }
// 
// {
//   rd(N,(X,Y,P)(N));
//   rep(i,N+1) res[i] = ll_inf;
//   rep(mask,1<<N){
//     rep(i,N) mn[i] = abs(X[i]);
//     rep(i,N) rep(j,N) if(BIT_ith(mask,j)) mn[i] <?= abs(X[i]-X[j]);
//     solve(BIT_popcount(mask));
//   }
//   rep(i,N+1) wt(res[i]);
// }


Measured memory_bytes: 3624