#include <bits/stdc++.h>
using namespace std;
using pii = pair<int, int>;
using pdi = pair<double, int>;

vector<double> id2f, parent;
vector<optional<pii>> tree;
int tree_root;

void solve(string &s, const int id, const int son) {
    if (id != tree_root)
        solve(s, parent[id], id);
    if (son != -1) {
        s.push_back( (tree[id].value().first == son) ? '-' : '.' );
    }
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin >> n;
    id2f.resize(2*n);
    parent.resize(2*n);
    tree.assign(2*n, nullopt);
    priority_queue<pdi> pq;
    for(int i=0; i<n; i++) {
        double f;
        cin >> f;
        id2f[i] = f;
        pq.push(pdi{-f, i});
    }
    int nnindex = n;
    while(pq.size() != 1) {
        const pdi a = pq.top();
        pq.pop();
        const pdi b = pq.top();
        pq.pop();
        id2f[nnindex] = -(a.first + b.first);
        tree[nnindex] = pii{a.second, b.second};
        parent[a.second] = nnindex;
        parent[b.second] = nnindex;
        pq.push(pdi{a.first + b.first, nnindex});
        nnindex++;
    }
    tree_root = nnindex-1;
    for(int i=0; i<n; i++) {
        string tmp;
        solve(tmp, i, -1);
        cout << tmp << '\n';
    }
    return 0;
}