#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll,ll> ii;
typedef vector<ll> vi;
typedef vector<ii> vii;
typedef vector<vi> vvi;

#define x first
#define y second
#define pb push_back
#define eb emplace_back
#define rep(i,a,b) for(auto i = (a); i < (b); ++i)
#define REP(i,n) rep(i,0,n)
#define sz(v) ((int) (v).size())
#define rs resize
#define all(v) begin(v), end(v)

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout << fixed << setprecision(20);
    ll n;
    cin >> n;
    vector<ld> f = vector<ld>(n);
    for(ll i = 0; i < n; i++)
        cin >> f[i];
    set<pair<ld,ll>> best;
    for(ll i = 0; i < n; i++)
        best.emplace(make_pair(f[i],i));
    vector<string> antw = vector<string>(n);
    vvi leden = vvi(n);
    for(ll i = 0; i < n; i++)
        leden[i].pb(i);
    while(best.size() > 1){
        pair<ld,ll> p1, p2;
        p1 = *best.begin();
        best.erase(p1);
        p2 = *best.begin();
        best.erase(p2);
        ll a = p1.y, b = p2.y;
        for(ll i : leden[a])
            antw[i].pb('-');
        for(ll i :leden[b]){
            antw[i].pb('.');
            leden[a].pb(i);
        }
        best.emplace(make_pair(p1.x + p2.x, a));
    }

    //Print het
    for(ll i = 0; i < n; i++){
        reverse(all(antw[i]));
        cout << antw[i] << endl;
    }
    return 0;
}