#include <bits/stdc++.h>

using namespace std;

const int MAXN = 210;
const long long INF = 1000000000000000000;
string s[MAXN];
vector<pair<int, long long> > f;
long long dp[MAXN][MAXN], pref[MAXN];
int par[MAXN][MAXN];

long long sum(int l, int r) {
    return pref[r] + (l == 0 ? 0 : pref[l-1]);
}

long long solve(int l, int r) {
    if (dp[l][r] != -1) {
        return dp[l][r];
    }
    if (l == r) {
        return dp[l][r] = 0;
    }
    dp[l][r] = INF;
    for (int m = l; m < r; m++) {
        long long cur = solve(l, m) + solve(m+1, r) + (sum(l, m)*2 + sum(m+1, r));
        if (cur < dp[l][r]) {
            dp[l][r] = cur;
            par[l][r] = m;
        }
    }
    return dp[l][r];
}

void reconstruct(int l, int r) {
    if (l == r) return;
    for (int i = l; i <= par[l][r]; i++) {
        s[f[i].second] += '-';
    }
    for (int i = par[l][r]+1; i <= r; i++) {
        s[f[i].second] += '.';
    }
    reconstruct(l, par[l][r]);
    reconstruct(par[l][r]+1, r);
}

int main() {
    ios::sync_with_stdio(false); cin.tie(0);
    int n; cin >> n;
    for (int i = 1; i <= n; i++) {
        double x; cin >> x;
        f.push_back({x*10000, i});
    }
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
            dp[i][j] = -1;
        }
    }
    sort(f.begin(), f.end());
    pref[0] = f[0].first;
    for (int i = 1; i < n; i++) {
        pref[i] = pref[i-1] + f[i].first;
    }
    solve(0, n-1);
    reconstruct(0, n-1);
    for (int i = 1; i <= n; i++) {
        cout << s[i] << '\n';
    }
    return 0;
}

/*
3
0.3000 0.6000 0.1000
 */