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 <iostream>
using namespace std;
int main()
{

	int n;

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

		int ice[10];
		int x;
		int c=0;
		
		for(int i=0 ;i<10 ;i++){
			ice[i] = 0;
		}
		for(int i=0 ;i<n ;i++){
			cin >> x;
		
			for(int j=0; j<10 ;j++){
				if(j==x){
					ice[j]++;
				}
			}
		}
		for(int i=0 ;i<10 ;i++){
			if(ice[i] > 0){
				for(int j=0 ;j<ice[i] ;j++){
					cout << '*' ;
				}
				cout << endl;
			}
			else if(ice[i] == 0)
				cout << '-' << endl;
		}
	}

	return 0;
}

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

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

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

C++: #include<iostream>

using namespace std;

int main() {
  int x,m,n;
  int a[10000];
  cin >> n;

  for(int i =0;i<n;i++){
    cin >> m;
    a[m] += 1;
  }
  for(int j =0;j<10;j++){
    if(a[j]==0){
      cout << "-";
    }else{
      for(int k =0;k<a[j];k++){
	cout << "*";
      }
    }
    cout << endl;
  }

	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <utility>
#include <algorithm>
#include <queue>
#include <stack>
#include <cstring>
#include <cstdlib>
#include <iomanip>
#include <string>
#include <ctype.h>

const int INF =100000000;

using namespace std;

int main(){

  while(1){

    int n ;

    cin >> n;

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

C++: #include <iostream>
#include <math.h>
#include <stdio.h>
#include <string>
#include <string.h>
#include <algorithm>
#include <cmath>
#include <limits>
#include <sstream>

using namespace std;

int main (void)
{
	for (int u = 0; u < 20; u++)
	{
		int n,a[100];
		int co[100];

		cin >> n;
		if (n == 0)
		{
			break;
		}

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

		for (int i = 0; i < n; i++)
		{
			co[a[i]] += 1;
		}

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

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

string grf(int x) {
	string s;
	if (x == 0) {
		s = "-";
		return s;
	}
	else {
		for (int i = 0;i < x;i++)s.push_back('*');
	}
	return s;
}

int main() {
	int n;
	while (cin>> n, n) {
		int a[10] = {};
		for (int i = 0;i < n;i++) {
			int b;
			cin >> b;
			a[b]++;
		}
		for (int i = 0;i < 10;i++) {
			cout << grf(a[i]) << endl;
		}
	}
	return 0;
}

C++: #include<stdio.h>
#include<stdlib.h>
int d[10];

int main(){
	while(1){
		int n,i,a;
		scanf("%d",&n);
		if(n==0)return 0;
		for(i=0;i<10;i++)d[i]=0;
		for(i=0;i<n;i++){
			scanf("%d",&a);
			d[a]++;
		}
		for(i=0;i<10;i++){
			for(int k=0;k<d[i];k++)printf("*");
			if(d[i]==0)printf("-");
			printf("\n");
		}
	}
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main(void)
{while(1)
{
	int  n=0;
	scanf("%d",&n);
	if(n==0){break;}
	int c=0,m[11]={0};
	for(int i=0;i<n;i++)
	{
		scanf("%d",&c);
		for(int j=0;j<11;j++)
		{
			if(c==j){m[j]++;break;}
		}
	}
	for(int i=0;i<10;i++)
	{
		if(m[i]==0){printf("-");}
		else
		{
		for(m[i]=m[i];m[i]>0;m[i]--)
		{
			printf("*");
		}
}
		printf("\n");
	}
}
	return 0;
}

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

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

using namespace std;

void solve()
{
	int n;
	while(cin >> n, n)
	{
		multiset<int> Set;
		for(int i = 0; i < n; ++i)
		{
			int temp;
			cin >> temp;
			Set.insert(temp);
		}
		for(int i = 0; i < 10; ++i)
		{
			int temp = Set.count(i);
			for(int j = 0; j < temp; ++j)
			{
				cout << "*";
			}
			if(!temp)
			{
				cout << "-";
			}
			cout << endl;
		}
	}
}

int main()
{
	solve();
	return(0);
}

C++: #include <bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;
typedef long long ll;
typedef pair<char, int>P;

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

C++: #include <algorithm>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <vector>

using namespace std;

#define reps(i,f,n) for(int i=f; i<int(n); ++i)
#define rep(i,n) reps(i,0,n)

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

const int INF = 1001001001;

int main()
{
	int n;
	while(scanf("%d", &n), n){
		int hist[10] = {0};
		rep(i, n){
			int a;
			scanf("%d", &a);
			hist[a]++;
		}
		rep(i, 10){
			if(hist[i] == 0)
				puts("-");
			else
				puts(string(hist[i], '*').c_str());
		}
	}
	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <time.h>
#include <math.h>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <algorithm>
#include <iterator>
#include <sstream>
#include <string>
#include <bitset>
using namespace std;
#define FOR(I,F,N) for(int I = F; I < (int)(N); I++)
#define rep(i, n) FOR(i, 0, n)
#define FIN(V) cout<<V<<endl
#define pb push_back
#define INF (1 << 30)
typedef pair<int, int> P;
typedef long long ll;
typedef priority_queue<int> pq;
int StrToInt(string);
string IntToStr(int);
int dx[4] = {1, -1, 0, 0};
int dy[4] = {0, 0, 1, -1};

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

	return 0;
}



int StrToInt(string s){
	stringstream ss;
	ss << s;
	int val;
	ss >> val;
	return val;
}
string IntToStr(int i){
	stringstream ss;
	ss << i;
	return ss.str();
}