/*
AM 02:54 -> AM 06:45
 */
#include<iostream>
#include<map>
#include<set>
#include<vector>
#include<algorithm>
#include<sstream>
#include<iomanip>
#include<cassert>
#include<bitset>
#include<cmath>
#include<climits>
#include<unordered_map>
#include<unordered_set>

#define REP(i,s,n) for(int i=s;i<n;i++)
#define rep(i,n) REP(i,0,n)
#define IINF (INT_MAX)
#define MAX 200
#define all(a) (a).begin(),(a).end()

using namespace std;

int N,limit,tail;
int d[MAX];
int mat[30][30];
int remain[10000];
int town[30];

set<vector<int>> result;

pair<vector<int>,bool> check(int state,int pos,int value){
  bitset<10> b = state;
  //cout << "check(" << b << "," << pos << "," << value << ")" << endl;
  if((state>>pos) & 1)return pair<vector<int>,bool>(vector<int>(),false);
  assert(value >= 0);
  int pstate = state;
  vector<int> add;
  pstate = pstate & ((1<<N)-2);
  while(pstate){
    int use = log2(pstate & -pstate);

    int diff1 = abs(town[use]-value);
    //cout << "diff = " << diff1 << " remain -> " << remain[diff1] << endl;
    if(remain[diff1] == 0){
      break;
    }
    pstate -= (pstate & -pstate);
    add.push_back(diff1);
    remain[diff1]--;
  }

  return pair<vector<int>,bool>(add,(pstate == 0));

}

void dfs(int state,int last){
  if(state == (1<<N)-1){
    /*
    cout << "town --- " << endl;
    rep(i,N){
    cout << town[i] << " ";
    }
    cout << endl;
    */
    vector<int> vec;
    REP(i,1,N){
      vec.push_back(town[i]-town[i-1]);
    }
    result.insert(vec);
    return;
  }


  while(last >= 0 && remain[d[last]] == 0)last--;
  if(last < 0 || ( last >= 0 && remain[d[last]] == 0))return;

  int value = d[last];

  //cout << "value = " << value << endl;
  //cout << "remain[" << value << "] = " << remain[value] << endl;

  bitset<10> st= ~state & ((1<<N)-1);
  int rstate = ~state & ((1<<N)-1);


  int use = log2(~state & ((1<<N)-1));
  vector<int> add;
  remain[value]--;
  pair<vector<int>,bool> F = check(state,use,value);
  add = F.first;
  if(F.second){//N徳恐粒
    //cout << "true" << endl;
    town[use] = value;
    dfs(state|(1<<use),last);
    town[use] = -1;
  } else {
    //cout << "false" << endl;
  }
  //cout << "add.size() = " << add.size() << endl;
  remain[value]++;

  for(int i : add){
    //cout << "add=>" << i << endl;
    remain[i]++;
  }

  if(remain[tail-value] == 0)return;
  use = log2(rstate & -rstate);
  //cout << "use2 = " << use << endl;
  remain[tail-value]--;
  F = check(state,use,tail-value);

  add = F.first;
  if(F.second){// 0徳恐粒
    //cout << "true" << endl;
    town[use] = tail - value;
    dfs(state|(1<<use),last);
    town[use] = -1; 
  } else {
    //cout << "false" << endl;
  }
  remain[tail-value]++;
  //cout << "add.size() = " << add.size() << endl;
  for(int i : add){    //cout << "add=>" << i << endl;
    remain[i]++;
  }

}

void compute(){
  town[0] = 0;
  town[N-1] = d[limit-1];
  remain[d[limit-1]]--;
  tail = d[limit-1];

  dfs(1|(1<<(N-1)),limit-1);
  //cout << "Result---------" << endl;
  for(vector<int> i : result){
    rep(j,i.size()){
      if(j)cout << ' ';
      cout << i[j];
    }
    cout << endl;
  }

}

int main()
{
  while(cin >> N,N){
    result.clear();
    
    
    limit = (int)(N*(N-1)*0.5);
    for(int& i : remain){
      i = 0;
    }

    vector<int> input;
    rep(i,N)town[i] = -1;
    rep(i,N)rep(j,N)mat[i][j] = -1;
    rep(i,limit){
      cin >> d[i];
      assert(d[i]);
      input.push_back(d[i]);
      remain[d[i]]++;
    }

    if( N == 2 ){
      cout << d[0] << endl;
      puts("-----");
      continue;
    }

    sort(all(input));
    input.erase(unique(all(input)),input.end());
    limit = input.size();
    rep(i,limit)d[i] = input[i];


    //mat[0][N-2] = d[limit-1];
    //remain[d[limit-1]]--;

    compute();
    puts("-----");
  }


  return 0;
}

Measured memory_bytes: 1300