#include <stdio.h>

int main()
{
	int j,i,n,ice[10],in;

	scanf("%d",&n);

	while(n != 0){
		for(i = 0; i < 10; i++){
			ice[i] = 0;
		}

		for(i = 0; i < n; i++){
			scanf("%d",&in);
			ice[in]++;
		}

		for(i = 0; i < 10; i++){
			if(ice[i] == 0){
				printf("-");
			}
			for(j = 0; j < ice[i]; j++){
				printf("*");
			}
			printf("\n");
		}

		scanf("%d",&n);
	}

	return 0;
}
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(n);i++)
#define rep2(i,n) for(int i=1;i<=(n);i++)
#define rep3(i,i0,n) for(int i=i0;i<(n);i++)
#define pb push_back
#define mod 1000000007
const ll INF = 1LL << 60;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
ll gcd(ll a, ll b) {return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b) {return a/gcd(a,b)*b;}
#define all(x) x.begin(), x.end()
#define mp make_pair
bool compare(pair<int, int> a, pair<int, int> b) {
    if(a.first != b.first){
        return a.first < b.first;
        
    }else{
        return a.second < b.second;
    }
}


bool In_map(ll y,ll x,ll h,ll w){
    if(y<0 || x<0 || y>=h || x>=w){
        return 0;
    }else{
        return 1;
    }
}
const vector<ll> dx{1,0,-1,0};
const vector<ll> dy{0,1,0,-1};

int main() {
    ll N;
    cin >> N;

    vector<ll> dp(N+1,INF);
    vector<ll> A(N);
    rep(i,N){
        cin >> A[i];
    }
    reverse(all(A));
    rep(i,N){
        ll inx;
        inx = upper_bound(all(dp),A[i]) -dp.begin();
        dp[inx] = A[i];
    }
    ll ans;
    rep(i,N+1){
        if(dp[i] == INF){
            ans = i;
            break;
        }
    }

    cout << ans << endl;
    return 0;
    

}
