#include <bits/stdc++.h> using namespace std; typedef vector<int> vi; #define int int64_t #define loop(i,s,t) for(int i=s;i<t;i++) #define all(a) a.begin(),a.end() typedef pair<int, int> ii; typedef vector<ii> vii; typedef long double ld; int32_t main() { ios_base::sync_with_stdio(false); cin.tie(0); int n; cin >> n; vector<double> f(n); priority_queue<pair<double, vi>, vector<pair<double, vi>>, greater<>> pq; loop(i,0,n){ cin >> f[i]; vi cur; cur.push_back(i); pq.push({f[i], cur}); } vector<string> s(n); while(pq.size() >= 2){ auto ptr1 = pq.top(); pq.pop(); auto ptr2 = pq.top(); pq.pop(); vi ind1 = ptr1.second; double v1 = ptr1.first; vi ind2 = ptr2.second; double v2 = ptr2.first; for (auto u: ind1) s[u].push_back('-'); for (auto u: ind2) s[u].push_back('.'); vi ind = ind1; for(auto u: ind2) ind.push_back(u); pq.emplace(v1 + v2, ind); } loop(i,0,n){ reverse(all(s[i])); cout << s[i] << endl; } return 0; }