#include <vector>
#include <iostream>
#include <map>
#include <algorithm>
#include <cassert>

#define ll long long
#define all(x) x.begin(), x.end()
#define ve vector
#define vi vector<int>
#define vvi vector<vector<int>>
#define pb push_back
#define pii pair<int, int>


using namespace std;

template <class T>
istream& operator >>(istream&in, vector<T>&v) {
    for(T&el : v) {
        in >> el;
    }
    return in;
}

template <class T>
ostream& operator <<(ostream&out, vector<T>&v) {
    out <<"{";
    for(T&el : v) {
        out << el << ' ';
    }
    out <<"}";
    return out;
}

#define int ll

int cdist(int a, int b, int c, int d) {
    return abs(a - c) + abs(b - d);
}
signed main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int n;
    cin >> n;
    ve<pair<double, int>> vals(n);
    for (int i = 0; i < n; ++i) {
        cin >> vals[i].first;
        vals[i].second = i;
    }
    sort(all(vals));
    reverse(all(vals));

    ve<string> ans(n);
    ans[vals[0].second] = '.';
    ans[vals[1].second] = '-';
    for (int i = 2; i < n; ++i) {
        tuple<double, int> best = {1e20, -1};
        for (int j = 0; j < i; ++j) {
            double vl = 0;
            for (char c : ans[vals[i].second]) vl += (c == '-');
            best = min(best, {vl * vals[i].first + vals[j].first, j});
        }
        int ind = get<1>(best);
        ans[vals[i].second] = ans[vals[ind].second];
        ans[vals[ind].second] += '.';
        ans[vals[i].second] += '-';
    }
    for (auto s : ans) cout << s << "\n";
}