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<string>
#include<algorithm>
using namespace std;

int main() {
	int n,c;
	cin >> n;
	int hai[10];
	fill(hai,hai + 10,0);
	for(int i = 0;i<n;i++){
		cin >> c;
		for(int j = 0;j<10;j++){
			if(c == j)
				hai[j]++;
		}

	}
	for(int i = 0;i<10;i++){
		if(hai[i]!=0){
			 string f(hai[i],'*');
			cout << f << endl;
		}else{
			cout << '-' << endl;
		}
	}


	return 0;
}

C++: #define _USE_MATH_DEFINES
#include <iostream>
#include <complex>
#include <algorithm>
#include <vector>
#include <stack>
#include <string>
#include <queue>
#include <cmath>
#include <math.h>
#include <numeric>
#include <list>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <climits>
#include <set>
#include <memory.h>
#include <memory>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <cassert>
#include <map>
#include <cassert>
#include <time.h>
#include <ctime>

using namespace std;

typedef complex<double> xy_t;
typedef pair<xy_t, xy_t> line;
typedef vector<xy_t> polygon;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<int , P> PP;
typedef pair<int, string> Ps;
typedef vector<int> vec;
typedef vector<vec> mat;
const int INF = 1 << 29;
const double EPS = 1e-10;
const double PI = 3.1415926535897932384626433832795;
const int CLK = CLOCKS_PER_SEC;

#define rep(i, n) for(int i = 0; i < n; i++)
#define rep2(i, m, n) for(int i = m; i < n; i++)
#define repD(i, n) for(int i = n; i >= 0; i--)

int nums[10];
int main(){
	int n;
	int type;
	while(cin >> n && n){
		memset(nums, 0, sizeof(nums));
		rep(i, n){
			cin >> type;
			nums[type]++;
		}
		rep(i, 10){
			if(nums[i] == 0) cout << '-' << endl;
			else{
				rep(j, nums[i]) cout << '*';
				cout << endl;
			}
		}
	}
	return 0;
}

C++: #include<iostream>

using namespace std;

int main(){
  int n, i;
  while(cin >> n){
    //    cout << '!' << endl;
    int ice[10] = {};
    while(n--) {
      cin >> i;
      ice[i]++;
    }
    for(i = 0; i < 10; i++) {
      if(ice[i])
	while(ice[i]--) cout << '*';
      else cout << '-';
      cout << endl;
    }
  }
  return 0;
}

C++: #include<stdio.h>
int main()
{
	int n,x;
	while(scanf("%d",&n),n)
	{
		int a[10]={0};
		while(n--)scanf("%d",&x),++a[x];
		for(n=0;n<10;++n)
		{
			if(a[n])while(a[n]--)putchar('*');
			else putchar('-');
			puts("");
		}
	}
	return 0;
}

C++: #include <iostream>

using namespace std;

int main() {
    int n;
    while (cin >> n) {
        if (n == 0) break;
        int ice[10];
        for (int i = 0; i < 10; i++) {
            ice[i] = 0;
        }
        for (int i = 0; i < n; i++) {
            int p; cin >> p;
            ice[p]++;
        }
        for (int i = 0; i < 10; i++) {
            if (ice[i] == 0) {
                cout << '-'; 
            }
            for (int j = 0; j < ice[i]; j++) {
                cout << '*';
            }
            cout << endl;
        }
    }
    return 0;
}

C++: #include <iostream>
#include <cstring>
//#include <fstream>

using namespace std;

int total[10];

int main()
{
//	cut here before submit 
//	freopen ("testcase.iceshop", "r", stdin );
	string str = "";
	int n;

	while (cin >> n && n ){
		memset (total, 0, sizeof (total ) );

		int i,j;
		for (i = 0; i < n; ++i ){
			int ice;
			cin >> ice;
			++total[ice];
		} // end for

		for (i = 0; i < 10; ++i ){
			if (total[i] == 0 ){		
				cout << '-' << endl;
			}else{
				for (j = 0; j < total[i]; ++j ){
					cout << '*';
				} // end for
				cout << endl;
			} // end if
		} // end for
	} // end loop
		
	return 0;
}

C++: #include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<iostream>
#include<string>
#include<algorithm>
#include<queue>
#include<utility>

using namespace std;

int n;

int c;

int ice[10];

int main(void)
{
	while (cin >> n, n)
	{
		for (int i = 0; i < n; i++)
		{
			cin >> c;

			ice[c]++;
		}

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

				continue;
			}

			for (int j = 0; j < ice[i]; j++)
			{
				cout << "*";
			}

			cout << endl;
		}

		fill(&ice[0], &ice[10], 0);
	}

	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
int main(){
  int n;
  while(1){
    cin>>n;
    if(n==0){
      break;
    }
    int p,ice[10];
    for(int i=0;i<=9;i++){
      ice[i]=0;
    }
    for(int i=0;i<n;i++){
      cin>>p;
      ice[p]++;
    }
    for(int i=0;i<=9;i++){
      if(ice[i]==0){
	cout<<'-';
      }else{
	for(int j=0;j<ice[i];j++){
	  cout<<'*';
	}
      }
      cout<<endl;
    }
  }
  return(0);
}

C++: using namespace std;
#include <iostream>
#include <string>
#include <set>
#include <functional>
#include <vector>
#include <algorithm>
#include <stdio.h>
int main()
{
	int n;
	while(cin>>n&&n){
		int num[10]={},tmp;
		while(n--){cin>>tmp;num[tmp]++;}
		for(int i=0;i<10;i++){
			if(num[i])for(int j=0;j<num[i];j++)printf("*");
			else printf("-");
			printf("\n");
		}
	}
    return 0;
}

C++: #include <iostream>
#include <cstdio>
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 <algorithm>
using namespace std;


int main(){
	int n;
	while(cin >> n && n){
		string p[10];
		for(int i = 0 ; i < n ; i++){
			int a;
			cin >> a;
			p[a] += "*";
		}
		for(int i = 0 ; i < 10 ; i++){
			cout << (p[i].size()==0?"-":p[i]) << endl;
		}
	}
}

C++: #include<iostream>
#include<algorithm>
#include<vector>
#include<cmath>
#include<cstdio>
#include<string>
#include<cmath>
typedef long long int ll;
#define VI vector<int>

#define rep(i,a) for(int i=0;i<(a);i++)

int n,m;

using namespace std;


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

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <map>
#define rep(i,n) for(int i=0;i<(int)n;i++)

using namespace std;


int main()
{
	int n;
	cin>>n;
	for(;n!=0;cin>>n)
	{
		int a[10]={};
		rep(i,n)
		{
			int x;
			cin>>x;
			a[x]++;
		}
		
		rep(i,9)
		{
			if(a[i]==0)
			{
				cout<<"-"<<endl;
				continue;
			}
			rep(k,a[i])
			{
				cout<<"*";
			}
			cout<<endl;
			
		}
		
	}
}

C++: #include<iostream>
using namespace std;
int main (){
    int n;
    cin >> n;
    for (int i=0; i<n; i++){
        int a[i];
        cin >> a[i];}
    
    
    for (int i=0; i<n; i++){int a[i];
        if (a[i] != 0){int a[i];
            for (int j=0; j<a[i]; j++){
                cout << "*" ;
            }cout << endl;
        }
        else {
            cout << "-" << endl;
        }
    }return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(){
	while(1){
		int a[10]={0};
		int n;
		cin>>n;
		if(n==0) return 0;
		for(int i=0;i<n;i++){
			int num;
			cin>>num;
			a[num]++;
		}
		for(int i=0;i<10;i++){
			for(int j=0;j<a[i];j++) cout<<"*";
			if(a[i]==0) cout<<"-";
			cout<<"\n";
		}
	}
}