#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
const int MOD = 1000000007;

int n;
int d[200];
int b[20][20];
int cnt[401];

vector<vector<int> > ans;

void dfs(int x, int y, int M) {
    if (x+y == n) {
        vector<int> v;
        for (int i = y; i < n-2; i++) {
            b[0][i] = b[0][i-1]-b[n-2-(i-1)][i-1];
            v.push_back(b[0][i]);
            cnt[b[0][i]]--;
            if (cnt[b[0][i]] < 0) {
                rep(j,v.size()) {
                    cnt[v[j]]++;
                }
                return;
            }
        }
        for (int i = 1; i < n-1; i++) {
            for (int j = 0; j < n-1; j++) {
                if (i+j >= n-2) break;
                if (i < x && j < y) continue;
                b[i][j] = b[i-1][j]-b[i-1][n-2-(i-1)];
                v.push_back(b[i][j]);
                cnt[b[i][j]]--;
                if (cnt[b[i][j]] < 0) {
                    rep(k,v.size()) {
                        cnt[v[k]]++;
                    }
                    return;
                }
            }
        }
        rep(k,v.size()) cnt[v[k]]++;
       for (int i = 0; i < n-1; i++) {
            for (int j = 1; j < n-1; j++) {
                if (i+j >= n-1) break;
                if (b[i][j-1]-b[i][j] != b[n-2-(j-1)][j-1]) return;
                if (b[j-1][i]-b[j][i] != b[j-1][n-2-(j-1)]) return;
            }
            //break;
        }
        v.clear();
        rep(i,n-1) {
            v.push_back(b[i][n-2-i]);
        }
        ans.push_back(v);
        return;
    }
    while (!cnt[M]) M--;
    cnt[M]--;
    b[x][0] = M;
    b[x-1][n-2-(x-1)] = b[x-1][0]-b[x][0];
    if (cnt[b[x-1][n-2-(x-1)]] > 0) {
        cnt[b[x-1][n-2-(x-1)]]--;
        bool ok = true;
        for (int i = 1; i < y; i++) {
            b[x][i] = b[x-1][i]-(b[x-1][0]-b[x][0]);
            cnt[b[x][i]]--;
            if (cnt[b[x][i]] < 0) ok = false;
        }
        if (ok) dfs(x+1, y, M);
        for (int i = 1; i < y; i++) {
            cnt[b[x][i]]++;
        }
        cnt[b[x-1][n-2-(x-1)]]++;
    }

    b[0][y] = M;
    b[n-2-(y-1)][y-1] = b[0][y-1]-b[0][y];
    if (cnt[b[n-2-(y-1)][y-1]] > 0) {
        cnt[b[n-2-(y-1)][y-1]]--;
        bool ok = true;
        for (int i = 1; i < x; i++) {
            b[i][y] = b[i][y-1]-(b[0][y-1]-b[0][y]);
            cnt[b[i][y]]--;
            if (cnt[b[i][y]] < 0) ok = false;
        }
        if (ok) dfs(x, y+1, M);
        for (int i = 1; i < x; i++) {
            cnt[b[i][y]]++;
        }
        cnt[b[n-2-(y-1)][y-1]]++;
    }

    cnt[M]++;
}

void solve() {
    ans.clear();
    memset(cnt, 0, sizeof(cnt));
    int M = -1;
    rep(i,n*(n-1)/2) {
        cin >> d[i];
        M = max(M, d[i]);
        cnt[d[i]]++;
    }
    b[0][0] = M;
    cnt[M]--;
    dfs(1, 1, M);
    sort(ans.begin(), ans.end());
    ans.erase(unique(ans.begin(), ans.end()), ans.end());
    rep(i,ans.size()) {
        rep(j,ans[i].size()) {
            cout << ans[i][j];
            if (j == ans[i].size()-1) cout << endl;
            else cout << " ";
        }
    }
    cout << "-----" << endl;
}

int main() {
    while (cin >> n) {
        if (n == 0) break;
        solve();
    }
}



Measured memory_bytes: 3176