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 <stdio.h>

#define ICES 10

int main(){
    int num[ICES];
    int n, tmp;

    while (scanf("%d",&n), n!=0){
        for (int i=0; i<ICES; i++) num[i]=0;
        for (int i=0; i<n; i++){
            scanf("%d", &tmp);
            num[tmp]++;
        }
        for (int i=0; i<ICES; i++){
            if (num[i]==0){
                printf("-\n");
            } else {
                for (int j=0; j<num[i]; j++){
                    printf("*");
                }
                printf("\n");
            }
        }
    }    
    return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int n,ice;
 int kind[10];


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

C++: #include<stdio.h>
int main(void)
{
	int n=1;
	int syurui[10]={0};
	int kazu=0;
	int i=0,j=0;
	
	
	while (n!=0)
	{
		scanf("%d",&n);
		if (n==0)
		{
			break;
		}
		for (i=1;i<=n;i++)
		{
			scanf("%d",&kazu);
			syurui[kazu]++;
		}
		for (i=0;i<10;i++)
		{
			if (syurui[i]==0)
			{
				printf("-");
			}
			else
			{
				for (j=1;j<=syurui[i];j++)
				{
					printf("*");
				}
			}
			printf("\n");
			syurui[i]=0;
		}
	}
	return 0;
}

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


}

C++: #include<stdio.h>
int main(void){
   int n, c[100], num, i, k;
   scanf("%d", &n);
   while ( n != 0 ) {
      for (i = 1; i <= n; i++ ) {
         scanf("%d", &num);
         c[num]++;
      }
      for (i = 1; i <= 9; i++ ) {
         num = 0;
         if (c[i] == 0) printf("-");
         else {
         for (k = 0; k < c[i]; k++ ) {
            printf("*");
         }
         }
         printf("\n");
         scanf("%d", &n);
      }
   }
   return 0;
}

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

int main(){
	while(1){
		int n,a,u[10]={0,1,2,3,4,5,6,7,8,9},p[10]={};
		cin >> n;
		if(n==0)return 0;
		for(int i=0;i<n;i++){
			cin >> a;
			for(int i=0;i<10;i++){
				if(a==u[i])p[i]=p[i]+1;
				/*cout << "p["<< i << "]=" << p[i];*/ 
			}
			/*cout << endl;*/
		}
		/*for(int i=0;i<10;i++){
			cout << "p["<< i << "]=" << p[i]; 
		}*/
		for(int r=0;r<10;r++){
			if(p[r]==0){cout << "-";}
			else if(p[r]!=0){
				for(int i=0;i<p[r];i++){
					cout << "*";
				}
			}
			cout << endl;
		}

	}
	return 0;
}

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 <<"\n" <<"-";
			}
		}
		cout <<endl;

	}


	return 0;
}

C++: #include<iostream>

using namespace std;

int main()
{
	while(true)
	{
		int n = 0;
		int ice[10001];

		for(int i = 0; i < 10001; i++)
		{
			ice[i] = 0;
		}

		cin >> n;

		if(n == 0)
		{
			return false;
		}

		for(int i = 0; i < n; i++)
		{
			int tmp;
			cin >> tmp;

			ice[tmp]++;
		}

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

			else
			{
				while(ice[i] != 0)
				{
					cout << '*';
					ice[i]--;
				}
			}

			cout << endl;
		}
	}
}

C++: #include<iostream>
#include<cstring>
using namespace std;
int n, a[10], x, n;
int main() {
	while (true) {
		cin >> n;
		if (n == 0) { break; }
		memset(a, 0, sizeof(a));
		for (int i = 0; i < n; i++) {
			cin >> x;
			a[x]++;
		}
		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;
			}
		}
	}
}

C++: #include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <set>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <cstdio>
#include <cstring>
#include <iterator>
#include <bitset>
#include <unordered_set>
#include <unordered_map>
#include <fstream>
#include <iomanip>
#include <cassert>
//#include <utility>
//#include <memory>
//#include <functional>
//#include <deque>
//#include <cctype>
//#include <ctime>
//#include <numeric>
//#include <list>
//#include <iomanip>

//#if __cplusplus >= 201103L
//#include <array>
//#include <tuple>
//#include <initializer_list>
//#include <forward_list>
//
//#define cauto const auto&
//#else

//#endif

using namespace std;


typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;

typedef vector<int> vint;
typedef vector<vector<int> > vvint;
typedef vector<long long> vll, vLL;
typedef vector<vector<long long> > vvll, vvLL;

#define VV(T) vector<vector< T > >

template <class T>
void initvv(vector<vector<T> > &v, int a, int b, const T &t = T()){
    v.assign(a, vector<T>(b, t));
}

template <class F, class T>
void convert(const F &f, T &t){
    stringstream ss;
    ss << f;
    ss >> t;
}

#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define reep(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n) reep((i),0,(n))
#define ALL(v) (v).begin(),(v).end()
#define PB push_back
#define F first
#define S second
#define mkp make_pair
#define RALL(v) (v).rbegin(),(v).rend()
#define DEBUG
#ifdef DEBUG
#define dump(x)  cout << #x << " = " << (x) << endl;
#define debug(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;
#else
#define dump(x) 
#define debug(x) 
#endif
#define LDcout(x,n) fixed<<setprecision(n)<<x

#define MOD 1000000007LL
#define EPS 1e-8
#define INF 0x3f3f3f3f
#define INFL 0x3f3f3f3f3f3f3f3fLL
#define maxs(x,y) x=max(x,y)
#define mins(x,y) x=min(x,y)

void mainmain(){
	int n;
	while(cin>>n,n){
		vint v(10);
		rep(i,n){
			int t;
			cin>>t;
			v[t]++;
		}
		rep(i,10){
			if(v[i]==0) cout<<"-"<<endl;
			else{
				rep(j,v[i]){
					cout<<"*";
				}
				cout<<endl;
			}
		}
	}
}


signed main() {
	ios_base::sync_with_stdio(false);
    cin.tie(0);
  	cout<<fixed<<setprecision(20);
    mainmain();
}

C++: #include <iostream>

using namespace std;

int main(int argc, char const* argv[])
{
	int n;
	int seel[10];

	while( cin >> n && n != 0 ){
		for( int i = 0;i < 10;i++ ) seel[i] = 0;
		for( int i = 0;i < n;i++ ){
			int a;
			cin >> a;
			++seel[a];
		}

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