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 <iostream>
#include <iomanip>
#include <cmath>
#include <string>
#include <cstring>
#include <utility>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#define debug(x) cerr << #x << ':' << x << endl
#define rep(i,n) for(int i=0;i<(int)n;++i)
#define ALL(c) (c).begin(), (c).end()
using namespace std;
typedef long long ll;

int main(){
    int n;
    while(1){
        cin >> n;
        if(n==0) break;
        vector<int> V(10,0);
        rep(i,n){
            int tmp;
            cin >> tmp;
            V[tmp]+=1;
        }
        rep(i,10){
            if(V[i]==0) cout << '-' << endl;
            else{
                rep(j,V[i]) cout << '*';
                cout << endl;
            }
        }
    }
    return 0;
}

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

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

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

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

int main(void){
	int n;

	while(cin>>n && n){
		int t[10];
		memset(t,0,sizeof(t));

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

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

			cout<<endl;
		}
	}

	return 0;
}

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

int main()
{
	int n,t;
	while(cin >> n, n)
	{
		int k[10] = {0};
		while(n--)
		{
			cin >> t;
			k[t]++;
		}

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

C++: #include<cstdio>
#include<iostream>
#include<algorithm>
#include<cstring>
#include<vector>
#define INF 999999
using namespace std;
int main(){
    int N;
    while(cin>>N,N){
        int ice[15]={0},X;
        while(N--){
            cin>>X;
            ice[X]++;
        }
        for(int i=0;i<10;i++){
            if(ice[i]==0)cout<<"-";
            else{
                while(ice[i]--){
                    cout<<"*";
                }
            }
            puts("");
        }
    }
    return 0;
}

C++: #include <stdio.h>
#include <iostream>

using namespace std;

int main() {
	int n;
	int kari;

	while (1) {
		int a[10] = {0};
		cin >> n;
		if (n == 0) {
			break;
		} else {
			for (int i = 0; i < n; i++) {
				cin >> kari;
				a[kari]++;
			}
			for (int i = 0; i < 10; i++) {
				if (a[i] == 0) {
					cout << "-" << endl;
				} else {
					for (int j = 0; j < a[i]; j++) {
						cout << "*";
					} 
					cout << endl;
				}
			}
		}
	}

	return 0;
}

C++: #include<iostream>
#include<string.h>
#include<vector>
#include<list>
#include<stdio.h>
#include<math.h>
#include<iomanip>
#include<map>
#include<stack>
#include<queue>
#define range(i,a,b) for(int i = (a); i < (b); i++)
#define rep(i,b) range(i,0,b)
#define debug(x) cout << "debug " << x << endl;
using namespace std;

int main(){
    int n, inp;
    while(cin >> n,n){
    int ice[15] = {0};
    rep(i,n){
        cin >> inp;
        ice[inp]++;
    }
    rep(i,10){
        if(ice[i] == 0){
            cout << '-';
        }else{
            rep(j, ice[i]){
                cout << '*';
            }
        }
        cout << endl;
    }
    }
}

C++: #include <iostream>
using namespace std;
int main(void){
#define MAX 10100
    int n; //販売されるアイスクリームの総数
    int c[MAX]; //アイスクリームの種類

    while(true){
        cin >> n;
        if(n == 0) break;
        
        int k[10] = {0}; //種類を集計
        for(int i = 0; i < n; i++){
            cin >> c[i];
            
            if(c[i] == 0) k[0]++;
            if(c[i] == 1) k[1]++;
            if(c[i] == 2) k[2]++;
            if(c[i] == 3) k[3]++;
            if(c[i] == 4) k[4]++;
            if(c[i] == 5) k[5]++;
            if(c[i] == 6) k[6]++;
            if(c[i] == 7) k[7]++;
            if(c[i] == 8) k[8]++;
            if(c[i] == 9) k[9]++;
        }

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

C++: #include<cstdio>
#include<algorithm>
int main(void)
{
	int n,uri,aic[10],i,j;
	scanf("%d",&n);
	while(n!=0){
		for(i=0;i<10;i++)	aic[i]=0;
		for(i=0;i<n;i++){
			scanf("%d",&uri);
			aic[uri]++;
		}
		for(i=0;i<10;i++){
			if(aic[i]==0)
				printf("-\n");
			else{
				for(j=0;j<aic[i];j++){
					printf("*");
				}
				printf("\n");
			}
		}
		scanf("%d",&n);
	}
	return 0;
}

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

int main(void)
{
    int N;

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

        int No;
        for(int i = 0; i < N; i++){
            cin >> No;
            d[No-1]++;
        }

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

return 0;
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <numeric>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <utility>
#include <sstream>
#include <complex>

using namespace std;

#define FOR(i,a,b) for(long long i=(a);i<(b);i++)
#define REP(i,N) for(long long i=0;i<(N);i++)
#define ALL(s) (s).begin(),(s).end()
#define fi first
#define se second

#define PI acos(-1.0)
#define INF 1000000007
#define EPS 1e-10

typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<double, double> PD;
typedef pair<string, ll> PS;
typedef vector<ll> V;

int co[100];
int n, a;

int main(){
	while (cin >> n&&n){
		REP(i, 10)co[i] = 0;
		REP(i, n){
			cin >> a;
			co[a]++;
		}
		REP(i, 10){
			if (co[i] == 0){
				cout << "-" << endl;
			}
			else {
				REP(j, co[i])cout << "*";
				cout << endl;
			}
		}
	}
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstring>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define rp(a) while(a--)
#define pb push_back
#define mp make_pair
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double EPS=1e-10;
using namespace std;
typedef long long ll;
typedef vector<int> vi;
int main(){
	int n;
	while(cin>>n,n){
		int out[10]={0};
		rep(i,n){
			int in;
			cin>>in;
			out[in]++;
		}
		rep(i,10){
			if(out[i])rep(j,out[i])cout<<"*";
			else cout<<"-";
			cout<<endl;
		}
	}
}