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>

using namespace std;

inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}
template<class T> inline T sqr(T x) {return x*x;}

typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef long long ll;

#define all(a)  (a).begin(),(a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define pb push_back
#define mp make_pair
#define each(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define exist(s,e) ((s).find(e)!=(s).end())
#define range(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n)  range(i,0,n)
#define clr(a,b) memset((a), (b) ,sizeof(a))
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

const double eps = 1e-10;
const double pi  = acos(-1.0);
const ll INF =1LL << 62;
const int inf =1 << 29;

int main(void){
	int n;
	while(cin >> n,n){
		int sell[10]={0};
		rep(i,n){
			int a;
			cin >> a;
			sell[a]++;
		}
		rep(i,10){
			if(sell[i]==0){
				puts("-");
			}else{
				rep(j,sell[i]) putchar('*');
				puts("");
			}
		}
	}
	return 0;
}

C++: #include <cstdio>
#include <iostream>

using namespace std;

int main()
{
	int n;
	int buy;
	int ice[10];

	while (scanf("%d", &n), n != 0){
		for (int i = 0; i < 10; i++){
			ice[i] = 0;
		}
		for (int i = 0; i < n; i++){
			scanf("%d", &buy);
			ice[buy]++;
		}

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

	return (0);
}

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

using namespace std;

int main(void){
	int a,n;
	while(1){
		map<int,string> str;
		cin >> n;
		for(a=0;a<n;a++){
			int b;
			cin >> b;
			str[b].push_back('*');
		}
		for(a=0;a<=9;a++){
			if(str.size()>0)cout << str[a] << endl;
			else cout << "-" << endl;
		}
	}
	return 0;
}

C++: #include <bits/stdc++.h>
#define r(i,n) for(int i=0;i<n;i++)
using namespace std;
int main(){
  int n,b,s;
  while(cin>>s,s){
    int a[10]={0};
    while(s--){
      cin>>b;
      a[b]++;
    }
  r(i,10){
    if(a[i])r(j,a[i])cout<<'*';
    else cout<<'-';
    cout<<endl;
  }
}
}

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

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

		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<iostream>
#include<algorithm>
#include<functional>
using namespace std;
int main(){
	int n;
	while(cin>>n,n){
		int cnt[10]={0},tmp;
		for(int i=0;i<n;i++){
			cin>>tmp;
			cnt[tmp]++;
		}
		for(int i=0;i<9;i++){
			if(cnt[i]==0)cout<<"-"<<endl;
			else for(int j=0;j<cnt[i];j++)(j==cnt[i]-1)?cout<<"*"<<endl:cout<<"*";
		}
	}
}

C++: #include <cstdio>
#include <iostream>

using namespace std;

int main()
{
	int n;
	int buy;
	int ice[10];

	while (scanf("%d", &n), n != 0){
		for (int i = 0; i < 10; i++){
			ice[i] = 0;
		}
		for (int i = 0; i < n; i++){
			scanf("%d", &buy);
			ice[buy]++;
		}

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

	return (0);
}

C++: #include<iostream>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<math.h>
#include<string>
#include<string.h>
#include<stack>
#include<queue>
#include<vector>
#include<utility>
#include<set>
#include<map>
#include<stdlib.h>
#include<iomanip>

using namespace std;

#define ll long long
#define ld long double
#define EPS 0.0000000001
#define INF 1e9
#define rep(i,n) for(i=0;i<n;i++)
#define loop(i,a,n) for(i=a;i<n;i++)
#define all(in) in.begin(),in.end()
#define shosu(x) fixed<<setprecision(x)

typedef vector<int> vi;
typedef pair<int,int> pii;

int main(void) {
  int i,j;
  int n;
  while(1){
    cin>>n;
    if(n==0)break;
    vi a(10,0);
    rep(i,n){
      int c;
      cin>>c;
      a[c]++;
    }
    rep(i,10){
      if(a[i]==0){
        cout<<"-"<<endl;
        continue;
      }
      rep(j,a[i])
        cout<<"*";
      cout<<endl;
    }
  }
}

C++: #include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <algorithm>
using namespace std;

int main() {
  int n;
  for(;;) {
    cin >> n;
    if(n == 0) break;
    
    int c;
    int ice[10] = {};
    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;
      }
    }

  }
}

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

int main()
{
    int n, t;
    while(cin >> n && n) {
        int hist[10];
        memset(hist, 0, sizeof(hist));
        for(int i = 0; i < n; i++) {
            cin >> t;
            hist[t]++;
        }
        for(int i = 0; i < 10; i++) {
            if(hist[i] == 0) {
                cout << "-" << endl;
            } else {
                for(int j = 0; j < hist[i]; j++) 
                    cout << "*";
                cout << endl;
            }
        }
    }
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin>>n;
  while(n!=0){
    int a;
    int q[10]={};
    for(int i=0;i<n;i++){
      cin>>a;
      q[a]++;
    }
    for(int i=0;i<10;i++){
      if(q[i]==0){
	cout<<'-'<<endl;
      }else{
	for(int l=0;l<q[i];l++){
	  cout<<'*';
	}
	cout<<endl;
      }
    }
    cin>>n;
  }
  return 0;
}

C++: #include <bits/stdc++.h>
#define rep(i,l,n) for(int i=l;i<n;i++)
#define rer(i,l,n) for(int i=l;i<=n;i++)
#define all(a) a.begin(),a.end()
#define o(a) cout<<a<<endl
#define pb(a) push_back(a)
#define mk(a,b) make_pair(a,b)
#define fi first
#define se second
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,int> pii;

int main(){
	int n;
	while(1){
		cin>>n;
		if(n==0) break;
		vi d(10);
		int a;
		rep(i,0,n){
			cin>>a; d[a]++;
		}
		rep(i,0,10){
			if(d[i]==0) o('-');
			else{
				rep(j,0,d[i]) cout<<'*';
				cout<<endl;
			}
		}
	}
}

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

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

int main(){
	int n,a[10],t;
	while(cin >> n,n){
		for(int i = 0;i < 10;i++) a[i] = 0;
		for(int i = 0;i < n;i++){
			cin >> t;
			a[t]++;
		}
		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;
}