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<bits/stdc++.h>
#define endl '\n'
#define INF (1 << 21)
const int MOD = 1000000009;
using namespace std;
int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  int ice[10];
  int c;

  cin >> n;
  while(n != 0){
    memset(ice, 0, sizeof(ice));
    for(int i = 0;i < n;i++){
      cin >> c;
      ice[c]++;
    }
    
    for(int i = 0;i <= 9;i++){
      if(ice[i] == 0){
	cout << "-" << endl;
      }else{
	for(int j = 0;j < ice[i];j++){
	  cout << "*";
	}
	cout << endl;
      }
    }
    
    cin >> n;
  }
  return 0;
}

C++: #include <stdio.h>
#include <vector>
#include <algorithm>

using namespace std;


int main(){

	int n,table[10],tmp;

	while(true){
		scanf("%d",&n);
		if(n == 0)break;

		for(int i = 0; i < 10; i++)table[i] = 0;

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

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

    return 0;
}

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

C++: #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <cstring>
using namespace std;
static const double EPS = 1e-5;
typedef long long ll;


int kind[10];
int pr[100];
main(){
	int n;
	
	while(cin>>n){
		if(n==0)break;
		
		memset(kind,0,sizeof(kind));
		
		for(int i=0;i<n;i++){
			int k;
			cin>>k;
			++kind[k];
		}
		
		for(int i=0;i<10;i++){
			if(kind[i]){
				for(int j=0;j<kind[i];j++)printf("*");
			}else{
				printf("-");
			}
			puts("");
		}
	}
	return 0;
}

C++: #include <bits/stdc++.h>
#include <stdio.h>
#include <numeric>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define repone(i,n) for(int i=1;i<(int)(n);++i)
#define repo(i,o,n) for(int i=o;i<(int)(n);++i)
#define Rep(j,n) for(int j=0;j<(int)(n);++j)
#define Repo(j,o,n) for(int j=o;j<(int)(n);++j)
#define Repone(j,n) for(int j=1;j<(int)(n);++j)
#define all(v) (v).begin(),(v).end()
#define rall(v) (v).rbegin(),(v).rend()
#define int long long
#define pb(a) push_back(a)
#define eraser(v,i) (v).erase(v.begin()+(i))
#define pbpair(a,b) push_back(make_pair(a,b))
#define MOD 1000000007
#define INF 9223372036854775807
#define pairint pair<int,int>
int num[12] = {31,28,31,30,31,30,31,31,30,31,30,31};
bool uru(int checkyear){if(checkyear%4==0){if(checkyear%100!=0||checkyear%400==0)return true;}return false;}
int gcd( int x, int y ){return y ? gcd(y, x%y) : x;}
bool pairCompare(const pairint& firstElof, const pairint& secondElof)
{
  if(firstElof.second!= secondElof.second)    return firstElof.second> secondElof.second;
  else return firstElof.first< secondElof.first;
}
signed main() {
int x=0,y=0,z=0,w=0,n=0,m=0;
std::vector<int> v(10);
while (std::cin >> x,x) {
  rep(i,10)v[i]=0;
  rep(i,x){
    std::cin >> y;
    v[y]++;
  }
  rep(i,10){
    if(v[i]>0){
      Rep(j,v[i]){
        std::cout << "*";
     }
      std::cout<< '\n';
  }else std::cout << "-" << '\n';
}
}
}

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

#define mp       make_pair
#define pb       push_back
#define all(x)   (x).begin(),(x).end()
#define rep(i,n) for(int i=0;i<(n);i++)
#define repi(i,a,b) for(int i = (a); i < (b); i++)

using namespace std;

typedef    long long          ll;
typedef    unsigned long long ull;
typedef    vector<bool>       vb;
typedef    vector<int>        vi;
typedef    vector<vb>         vvb;
typedef    vector<vi>         vvi;
typedef    pair<int,int>      pii;

const int INF=1<<29;
const double EPS=1e-9;

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

int main(){
	int n;
	while(cin>>n,n){
		map<int,int> data;
		data.clear();
		for(int i =0;i <n;i++){
			int x;
			cin>>x;
			data[x]++;
		}
		for(int i =0;i <=9;i++){
			if(data[i]==0)cout <<"-"<<endl;
			else{
				for(int j =0;j <data[i];j++){
					cout <<"*";
				}
				cout <<endl;
			}
		}
	}
	return 0;
}

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

int main()
{
	int n;

	cin >> n;

	while (n > 0) {

		int a[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
		for (int i = 0; i < n; i++) {
			int c;

			cin >> c;
			a[c]++;
		}

		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;
			}
		}
		
		cin >> n;
	}
	
	return 0;
}

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

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

int main() {
    while (true) {
        int n;
        cin >> n;
        
        if (n==0) {
            break;
        }
        
        map<int, int> mp;
        
        for (int i=0; i<10; i++) {
            mp[i] = 0;
        }
        
        for (int i=0; i<n; i++) {
            int ci;
            cin >> ci;
            mp[ci] += 1;
        }
        
        for (int i=0; i<10; i++) {
            if (mp[i]==0) {
                cout << '-' << endl;
            }
            else {
                for (int j=0; j<mp[i]; j++) {
                    cout << "*";
                }
                
                cout << endl;
            }
        }
    }
}

C++: #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <queue>
#include <stack>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#include <cmath>
#include <complex>
#include <map>
#include <climits>
#include <sstream>
using namespace std;

#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 EPS 1e-8
#define F first
#define S second
#define mkp make_pair

static const double PI=6*asin(0.5);
typedef long long ll;
typedef complex<double> CP;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vint;
static const int INF=1<<24;

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

//v.erase(unique(v.begin(),v.end()),v.end());


int main(){
	int n;
	while(cin>>n,n){
		vint v(10,0);
		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;
			}
		}
	}
}