Go: package main

import (
	"bufio"
	"os"
	"strconv"
	"fmt"
)

var scanner = bufio.NewScanner(os.Stdin)

func main() {
	for scanner.Scan() {
		n, _ := strconv.Atoi(scanner.Text())
		if n == 0 {
			break
		}
		a := make([]int, 10)
		for i := 0; i < n; i++ {
			scanner.Scan()
			c, _ := strconv.Atoi(scanner.Text())
			a[c]++
		}
		for _, v := range a {
			if v == 0 {
				fmt.Println("-")
				continue
			}
			for i := 0; i < v; i++ {
				if i == v-1 {
					fmt.Println("*")
				} else {
					fmt.Print("*")
				}
			}
		}
	}
}

C++: #include <cstdio>

int main(void)
{
    int n;
    int ice[10];
    
    int tmp;
    while (scanf("%d", &n)){
        for (int i = 0; i < 10; i++){
            ice[i] = 0;
        }
        if (n == 0) break;
        for (int i = 0; i < n; i++){
            scanf("%d", &tmp);
            ice[tmp]++;
        }
        
        for (int i = 0; i < 10; i++){
            if (0 < ice[i]){
                while (ice[i] != 0){
                    printf("*");
                    ice[i]--;
                }
            }
            else {
                printf("-");
            }
            printf("\n");
        }
    }
    
    return (0);
}

C++: #include <iostream>
#include <math.h>
#include <stdio.h>
#include <string>
#include <string.h>
#include <algorithm>
#include <cmath>
#include <limits>
#include <sstream>

using namespace std;

int main (void)
{
	for (int u = 0; u < 20; u++)
	{
		int a[10001];
		long n = 0,co[11];

		cin >> n;
		if (n == 0)
		{
			break;
		}

		for (int i = 0; i < n; i++)
		{
			cin >> a[i];
		}
		for (int j = 0; j < 10; j++)
		{
			co[j] = 0;
		}

		for (int i = 0; i < n; i++)
		{
			co[a[i]] += 1;
		}

		for (int j = 0; j < 10; j++)
		{
			if (co[j] == 0)
			{
				cout << '-';
			}
			else
			{
				for (int k = 0; k < co[j]; k++)
				{
					cout << '*';
				}
			}
			cout << endl;
		}
	}
}

C++: #include <iostream>
#include <stdio.h>
using namespace std;

int main(){
	int n;
	while(1){
		cin>>n;
		if(n==0) break;

		int x, ice[10] = {0};
		for(int i=0;i<n;i++){
			cin>>x;
			ice[x]++;
		}

		for(int i=0;i<10;i++){
			if(ice[i]==0){
				cout<<"-"<<endl;
			} else {
				for(int j=0;j<ice[i];j++) cout<<"*";
				cout<<endl;
			}
		}

	}
	return 0;
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <map>

#define REP(i,k,n) for(int i=k;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)
#define INF 1<<30

using namespace std;

int main()
{
	int n;
	while(cin >> n && n)
	{
		map<int,int> m;
		rep(i,n)
		{
			int temp;
			cin >> temp;

			m[temp]++;
		}
		
		rep(i,10)
		{
			if(m[i] == 0) cout << "-" << endl;
			else
			{
				rep(j,m[i]) cout << "*";
				cout << endl;
			}
		}
	}
}

C++: #include <iostream>
using namespace std;

int main(){
	int n;
	int ice[10000];
	int k[16];

	while(cin >>n,n){

		for(int i=0;i<16;i++){
			k[i]=0;
		}

		for(int i=0;i<n;i++){
			cin >>ice[i];
		}


		for(int i=0;i<n;i++){
			switch(ice[i]){
				case 0: k[0]++; break;
				case 1: k[1]++; break;
				case 2: k[2]++; break;
				case 3: k[3]++; break;
				case 4: k[4]++; break;
				case 5: k[5]++; break;
				case 6: k[6]++; break;
				case 7: k[7]++; break;
				case 8: k[8]++; break;
				case 9: k[9]++; break;
			}
		}
/*
		cout <<endl;
		for(int i=0;i<10;i++)
			cout << k[i] <<endl;
*/		

		for(int i=0;i<10;i++){
			if(k[i] > 0){
				for(int j=0;j<k[i];j++){
					if(j==0)
						cout <<endl;
					cout <<"*";
				}
//				cout << endl;
			}else {
				cout <<endl;
				cout <<"-";
			}
		}

	}


	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

int main() {
    int N;
    while (cin >> N, N) {
        vector<int> d(10);
        for (int i = 0; i < N; i++) {
            int x = 0;
            cin >> x;
            d[x]++;
        }

        for (auto i : d) {
            if (i == 0) cout << "-" << endl;
            else {
                for (int j = 0; j < i; j++) {
                    cout << "*";
                }
                cout << endl;
            }
        }
    }

    return 0;
}

C++: #include <iostream>
#include <complex>
#include <sstream>
#include <string>
#include <algorithm>
#include <deque>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <vector>
#include <set>
#include <limits>
#include <cstdio>
#include <cctype>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <ctime>
using namespace std;
#define REP(i, j) for(int i = 0; i < (int)(j); ++i)
#define FOR(i, j, k) for(int i = (int)(j); i < (int)(k); ++i)
#define SORT(v) sort((v).begin(), (v).end())
#define REVERSE(v) reverse((v).begin(), (v).end())
typedef complex<double> P;
 
int main() {
  int N;
  while(cin >>N && N){
    vector<int> cnt(10, 0);
    REP(i, N){
      int n; cin >>n;
      ++cnt[n];
    }
    REP(i, 10){
      if(cnt[i] <= 0) cout <<"-" <<endl;
      else{
        REP(j, cnt[i]) cout <<"*";
        cout <<endl;
      }
    }
  }
  return 0;
}

C++: #include<algorithm>
#include<functional>
#include<cmath>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<string>
#include<sstream>
#include<iostream>
#include<iomanip>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<map>
#include<set>
#include<bitset>
#include<climits>

#define all(c) (c).begin(), (c).end()
#define rep(i,n) for(int i=0;i<(n);i++)
#define pb(e) push_back(e)
#define mp(a, b) make_pair(a, b)
#define fr first
#define sc second

typedef unsigned long long UInt64;
typedef long long Int64;

const int INF=100000000;
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};

using namespace std;

typedef pair<int ,int > P;

void solve(int n)
{
	int a[10]={};
	rep(i,n)
	{
		int b;
		cin>>b;
		a[b]++;
	}

	rep(i,10)
	{
		if(a[i]==0) cout<<"-"<<endl;
		else
		{
			rep(j,a[i]) cout<<"*";
			cout<<endl;

		}

	}


}

int main()
{
	int n;
	while(cin>>n)
	{
		if(!n) return 0;
		solve(n);

	}
		return 0;
}

C++: #include <iostream>
using namespace std;
int hoge(int *n){cin>>*n;return *n;}
int main(){
	int n,num,ice[10];
	while(hoge(&n)){
		for(int i=0;i<10;i++) ice[i]=0;
		while(n--) cin >> num,ice[num]++;
		for(int i=0;i<10;i++){
			if(ice[i]) while(ice[i]--) cout<< "*";
			else cout << "-";
			cout << endl;
		}
	}
	return 0;
}

C++: #include<cstdio>
#include<algoritm>
#include<iostream>
using namespace std;
int main()
{
	int n,c[10]={0},m;
	while(1)
	{	
		for(int i=0;i<10;i++)
		{
			c[i]=0;
		}
		cin>>n;
		if(n==0)
		{
			break;
		}
		for(int i=1;i<=n;i++)
		{
			cin>>m;
			c[m]+=1;
		}
		for(int i=0;i<10;i++)
		{
			if(c[i]==0)
			{
				cout<<"_"<<end;
			}
			else
			{
				for(int j=0;j<c[i];i++)
				{
					cout<<"*";
				}
				cout<<endl;
			}
		}
	}	
	retutn 0;
}

C++: // 2011/07/20 Tazoe

#include <iostream>
using namespace std;

int main()
{
	while(true){
		int n;
		cin >> n;
		if(n==0)
			break;

		int cnt[10];
		for(int i=0; i<10; i++)
			cnt[i] = 0;		// 0ツづ渉可甘コツ可サ

		for(int i=0; i<n; i++){
			int ice;
			cin >> ice;
			cnt[ice]++;
		}

		for(int i=0; i<10; i++)
			if(cnt[i]==0){
				cout << '-' << endl;
			}
			else{
				for(int j=0; j<cnt[i]; j++)
					cout << '*';
				cout << endl;
			}
	}

	return 0;
}

C++: #include <bits/stdc++.h>
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define RFOR(i,a,b) for(int i=(b) - 1;i>=(a);i--)
#define REP(i,n) for(int i=0;i<(n);i++)
#define RREP(i,n) for(int i=n-1;i>=0;i--)

#define PB push_back
#define INF INT_MAX/3
#define ALL(a) (a).begin(),(a).end()
#define CLR(a) memset(a,0,sizeof(a))

typedef long long int ll;

using namespace std;

int main(){
    while(true){
    int n;
    int res[10] = {0};
    cin >> n;
    if(n==0) break;
    REP(i,n){
	int t;
	cin >> t;
	res[t]++;
    }
    REP(i,10){
	if(res[i] == 0){
	    cout << "-" << endl;
	}else{
	    REP(j,res[i]){
		cout << "*";
	    }
	    cout << endl;
	}
    }
    }
    return 0;
}