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 <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>

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;
typedef unsigned long long ULL;

#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#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 SORT(c) sort((c).begin(),(c).end())

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

const double EPS = 1e-10;
const double PI  = acos(-1.0);

#define CLR(a) memset((a), 0 ,sizeof(a))

#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

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

int main() {
  int n;

  while(cin >> n, n) {
    int s;
    int ice[10] = {0};
    REP(i, n) {
      cin >> s;
      ice[s]++;
    }

    REP(i, 10) {
      if(!ice[i]) cout << '-' << endl;
      else {
	REP(j, ice[i]) cout << '*';
	cout << endl;
      }
    }
  } 
}

C++: #include <cstdio>
main(){int n;while(scanf("%d",&n), n){int p[10]={0},t;for(;n;n--)scanf("%d",&t),p[t]++;for(t=0;t<10;t++){if(p[t])for(n=p[t];n;n--)printf("*");else printf("-");puts("");}}}

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

int main(void){
  int n;
  while(cin>>n,n){
    int in[10] = {0};
    for(int i = 0 ; i < n ; i ++){
      int m;
      cin>>m;
      in[m] ++;
    }
    for(int i = 0 ; i < 10 ; i ++){
      if(in[i]){
	for(int j = 0 ; j < in[i] ; j ++)
	  cout<<"*";
      }
      else 
	cout<<"-";
      cout<<endl;
    }
  }
}

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

int sell[10];
int main() {
  int n,p;
  while(cin>>n, n) {
    for(int i=0; i<10; ++i) sell[i] = 0;
    for(int i=0; i<n; ++i) {
      cin>>p;
      sell[p]++;
    }
    for(int i=0; i<10; ++i) {
      if(sell[i] == 0) cout<<"-";
      else while(sell[i]--) cout<<"*";
      cout<<endl;
    }
  }
}

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

C++: #include <stdio.h>
int main() {int RB[10],N,i,j;while (scanf("%d",&N)!=EOF && N) {i=0;while (i<10) RB[i++]=0;while (N--) scanf("%d",&i),RB[i]++;i=0;while (i<10) {if (!RB[i]) putchar('-');for (j=0;j<RB[i];putchar('*'),j++);puts(""),i++;}} return 0;}

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

using namespace std;

int main(void){

int n,x,a[10];

while(cin >> n,n){
fill(a,a+10,0);

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

return 0;
}

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

C++: #include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>
#include <cmath>

static const int MOD = 1000000007;
using ll = long long;
using u32 = unsigned;
using u64 = unsigned long long;
using namespace std;

template<class T> constexpr T INF = ::numeric_limits<T>::max()/32*15+208;

int main() {
    int n;
    while(cin >> n, n){
        array<int, 10> cnt{};
        for (int i = 0; i < n; ++i) {
            int x; scanf("%d", &x);
            cnt[x]++;
        }
        for (int i = 0; i < 10; ++i) {
            if(!cnt[i]) puts("-");
            else cout << string(cnt[i], '*') << "\n";
        }
    }
    return 0;
}

C++: // 2013/09/17 Tazoe

#include <iostream>
using namespace std;

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

		if(n==0)
			break;

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

			cnt[m]++;
		}

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

			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<10;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 <iostream>
#include <string>
int ice[10];
int main(){
	int n;
	whlie(std::cin>>n,n){
		for(int i=0;i<10;++i)ice[i]=0;
		for(int i=0;i<n;++i){
			int a;
			std::cin>>a;
			ice[a]++;
		}
		for(int i=0;i<10;i++){
			if(ice[i]==0)std::cout<<'-'<<std::endl;
			else {
				std::string s(ice[i],'*');
				std::cout<<s<<std::endl;
			}
		}
	}
}

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

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

main(){
	while(true){
		int n;
		cin>>n;
		
		if(n<=0){
			break;
		}
		
		int cnt[10]={0};
		
		for(int i=0; i<n; ++i){
			int c;
			cin>>c;
			
			cnt[c]++;
		}
		
		for(int c=0; c<=9; ++c){
			if(cnt[c]==0){
				puts("-");
			}else{
				for(int j=0; j<cnt[c]; ++j){
					cout<<'*';
				}
				cout<<endl;
			}
		}
	}
}

C++: #include <cstdio>

int n,ice[10];

int main(){
	while(scanf("%d", &n),n){
		for(int i = 0; i < 10; i++) ice[i] = 0;
		for(int i = 0; i < n; i++){
			int x; scanf("%d", &x);
			ice[x]++;
		}
		for(int i = 0; i < 10; i++){
			if(ice[i] == 0) printf("-\n");
			else{
				for(int j = 0; j < ice[i]; j++) printf("*");
				printf("\n");
			}
		}
	}
}

C++: #include <cstdio>
main(){
	int n;
	while(scanf("%d", &n), n){
		int p[10] = {0}, t;
		for(;n;n--)
			scanf("%d", &t), p[t]++;

		for(t=0;t<10;t++){
			if(p[t])
				for(n=p[t];n;n--)
					printf("*");
			else printf("-");
		}
	}
}