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++: //25
#include<iostream>
#include<string>

using namespace std;

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

C++: #include <bits/stdc++.h>
#define endl    '\n'
using namespace std;

typedef long long ll;

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);

    int n, c;

    cin >> n;

    while (n != 0) {
        int hist[10] = {};

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

            hist[c]++;
        }

        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;
            }
        }

        cin >> n;
    }

    return 0;
}

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

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

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

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

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

C++: #include <iostream>
using namespace std;
int main(){
  int a ,n ,i ,ice[10]={};
  while(  cin >> n ){
    if( n == 0 ){
      break;
    }
    
    for( i=0 ; i<n ; i++ ){
      cin >> a;
      ice[a]++;
    }
    
    for( i=0 ; i<10 ; i++ ){
      if( ice[i] == 0 ){
	cout << '_';
      }

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

C++: #include <cstdio>
#include <utility>
#include <string>
using namespace std;

#define gcu getchar_unlocked
int in(int c){int n=0;bool m=false;if(c=='-')m=true,c=gcu();
	do{n=10*n+(c-'0'),c=gcu();}while(c>='0');return m?-n:n;} //&&c<='9'
int in() {return in(gcu());}
bool scan(int &n){int c=gcu();return c==EOF?false:(n=in(c),true);}
bool scan(char &c){c=gcu();gcu();return c!=EOF;}
//bool scan(string &s){int c;s="";
//	for(;;){c=gcu();if(c=='\n'||c==' ')return true;else if(c==EOF)return false;s+=c;}}
template <typename head, typename... tail>
bool scan(head &h, tail&&... t){return scan(h) && scan(t...);}
#define pcu putchar_unlocked
#define vo inline void out
template <typename T>
vo(T n){static char buf[20];char *p=buf;
	if(n<0)pcu('-'),n*=-1;if(!n)*p++='0';else while(n)*p++=n%10+'0',n/=10;
	while (p!=buf)pcu(*--p);}
vo(const char *s){while(*s)pcu(*s++);}
vo(char c){pcu(c);}
vo(string &s){for (char c: s) pcu(c);}
template <typename head, typename... tail> vo(head&& h, tail&&... t){out(h);out(move(t)...);}
//template <typename T> vo(vector<T> &v){for(T &x:v)out(&x == &v[0]?"":" "),out(x);out('\n');}
#undef vo

int main() {
	for (int n; (n = in());) {
		int t[10] = {};
		while (n--)
			t[in()]++;
		for (int i: t)
			out(i ? string(i, '*') : "-",'\n');
	}
}

C++: #include<bits/stdc++.h>
using namespace std;
int main() {
	int n, T[10], x;
	while (cin >> n && n) {
		for (int i = 0; i < 10; i++)
			T[i] = 0;
		for (int i = 0; i < n; i++) {
			cin >> x;
			T[x]++;
		}
		for (int i = 0; i < 10; i++) {
			if (T[i] == 0)
				cout << "-" << endl;
			else {
				for (int j = 0; j < T[i]; j++)
					cout << "*";
				cout << endl;
			}
		}
	}
	return 0;
}

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

C++: // 2012/07/16 Tazoe

#include <iostream>
using namespace std;

int main()
{
	while(true){
		int n;
		cin >> n;

		if(n==0)
			break;

		int cnt[10];
		for(int i=0; i<10; i++){
			cnt[i] = 0;
		}

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

			cnt[ice]++;
		}

		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<bits/stdc++.h>
using namespace std;

int main()
{
  ios_base::sync_with_stdio(false);

  int n;
  int h[10];
  int temp;

  while(1){
    cin >> n;
    if(n == 0) break;

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

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

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

  }

  return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <stdio.h>
#include <algorithm>
#include <functional>
#include <cstring>
#include <queue>
#include <stack>
#include <math.h>
#include <iterator>
#include <vector>
#include <string>
#include <set>
#include <math.h>
#include <iostream>
using namespace std;
int main() {
	while (true) {
		int n;
		scanf("%d", &n);
		if (n == 0) break;
		int dp[10] = {};
		for (int i = 0;i < n;++i) {
			int a = 0;
			scanf("%d", &a);
			dp[a]++;
		}
		for (int i = 0;i < 10;++i) {
			if (dp[i] == 0) {
				printf("-\n");
			}
			else {
				for (int q = 0;q < dp[i];++q) {
					printf("*");
				}
				printf("\n");
			}
		}
	}
}

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

int main() {
	int n;
	while (cin >> n, n) {
		int g[10];
		memset(g, 0, sizeof(g));
		for (int i = 0; i < n; i++) {
			int x;
			cin >> x;
			g[x]++;
		}
		for (int i = 0; i < 10; i++) {
			if (g[i] == 0) cout << '-' << endl;
			else {
				cout << string(g[i], '*') << endl;
			}
		}
	}
	return 0;
}

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

int main()
{
  int n;
  while (cin >> n) {
    if (n == 0)
      break;

    vector<int> hyouka(10, 0);
    for (int i = 0; i < n; ++i) {
      int k;
      cin >> k;
      ++hyouka[k];
    }

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

  }
  return 0;
}