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>
#include <string>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <vector>
#include <cstring>
#include <cstdio>
#include <cstdlib>
using namespace std;

signed main(){
    cin.tie(0); 
    ios::sync_with_stdio(false);
    int n;
    int sell[20];
    int c;
    cin>>n;
    while(n!=0){
        for(int i=0;i<10;i++){
            sell[i]=0;
        }
        for(int i=0;i<n;i++){
            cin>>c;
            sell[c]++;
        }
        for(int i=0;i<10;i++){
            if(sell[i]==0){
                cout<<'-';
            }else{
                for(int j=0;j<sell[i];j++){
                    cout<<'*';
                }
            }
            cout<<"\n";
        }
        cin>>n;
    }
    return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
#include <array>
#include <vector>

using namespace std;

int main() {

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

	array<int, 10> hist;
	hist.fill( 0 );
	for ( int i = 0; i < n; i++ ) {
	  int elem;
	  cin >> elem;
	  hist[ elem ]++;
	}
	for ( const int num : hist ) {
	  if ( num > 0 ) {
		for ( int i = 0; i < num; i++ ) {
		  cout << "*";
		}
		cout << endl;
	  } else {
		cout << "-" << endl;
	  }			   
	}
  }  
}

C++: #include <iostream>

using namespace std;

void solve()
{
	int n;
	while(cin >> n, n)
	{
		int count[10] = {0};
		while(n--)
		{
			int num;
			cin >> num;
			++count[num];
		}
		for(int i = 0; i < 10; ++i)
		{
			if(count[i] == 0)
			{
				cout << "-" << endl;
				continue;
			}
			for(int j = 0; j < count[i]; ++j)
			{
				cout << "*";
			}
			cout << endl;
		}
	}
}

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

C++: #include<cstdio>
#include<cstring>
int main(){
 int a,j,b[10];
 while(1){
  scanf("%d",&a);
 if(a==0) return 0;
 memset(b,0,sizeof(int)*10);
 for(int i=0;i<a;i++){
  scanf("%d",&j);
  b[j]++;
 }
 for(int i=0;i<10;i++){
  if(b[i]==0){
  printf("-\n");
 continue; 
 }
  for(int s=0;s<b[i];s++){
    printf("*");
  }
  printf("\n");
 }
 }
}

C++: /*
 * src.cpp
 *
 *  Created on: 2016/08/04
 *      Author: joi
 */

#include <bits/stdc++.h>

using namespace std;

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

int N;

int cnt[10];

int main(){
	do{
		cin>>N;
		if (N){
			fill(cnt,cnt+10,0);
			REP(i,N){
				int a;
				cin>>a;
				cnt[a]++;
			}
			REP(i,10){
				if (cnt[i]==0){
					cout<<'-'<<endl;
				}else{
					REP(j,cnt[i]){
						cout<<'*';
					}
					cout<<endl;
				}
			}
		}
	}while (N);
	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <cstring>

using namespace std;

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

typedef long long ll;

int c[10];

int main(){
	int n;
	
	while (cin >> n, n){
		REP(i,10) c[i] = 0;
		
		REP(i,n){
			int a;
			
			scanf("%d", &a);
			
			c[a]++;
		}
		
		REP(i,10){
			if (c[i] == 0) printf("-\n");
			else {
				REP(j,c[i]) printf("*");
				puts("");
			}
		}
	}
	
	return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb push_back
#define mp make_pair
#define it ::iterator
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double ESP=1e-10;
using namespace std;
int main(){
  int n;
  while(cin>>n,n){
    int out[10]={0};
    rep(i,n){
      int a;cin>>a;
      out[a]++;
    }
    rep(i,10){if(out[i])rep(j,out[i])cout<<'*';else cout<<'-';cout<<endl;}
  }
}

C++: #include<iostream>
#include<string>
#include<cstring>

int main()
{
	int n;
	while( std::cin >> n, n )
	{
		int cnt[10];
		memset( cnt, 0, sizeof( cnt ) );

		for( int i = 0; i != n; ++i )
		{
			int a;
			std::cin >> a;
			++cnt[a];
		}

		for( int i = 0; i <= 9; ++i )
			std::cout << ( cnt[i] ? std::string( cnt[i], '*' ) : "-" ) << std::endl;
	}

	return 0;
}

C++: #include <stdio.h>

int main()
{
	int j,i,n,ice[10],in;

	scanf("%d",&n);

	while(n != 0){
		for(i = 0; i < 10; i++){
			ice[i] = 0;
		}

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

		for(i = 0; i < 10; i++){
			if(ice[i] == 0){
				printf("-");
			}
			for(j = 0; j < ice[i]; j++){
				printf("*");
			}
			printf("\n");
		}

		scanf("%d",&n);
	}

	return 0;
}

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

#define for_(i,a,b) for(int i=(a);i<(b);++i)

int main() {
	int n;
	
	while (cin >> n, n) {
		int cnt[11] = {0};
		
		for_(i,0,n) {
			int a;
			cin >> a;
			++cnt[a];
		}
		
		for_(i,1,11) {
			if (cnt[i] == 0) cout << "-";
			for_(j,0,cnt[i]) cout << "*";
			cout << endl;
		}
	}
}

C++: #include <algorithm>
#include <cctype>
#include <cstdio>
#include <cmath>
#include <iostream>
#include <functional>
#include <queue>
#include <string>
#include <map>
#include <vector>

using namespace std;

int main() {
  for (;;) {
    int n;
    cin >> n;
    if (!n) return 0;
    int is[10];
    fill(is, is+10, 0);
    for (int i = 0; i < n; i++) {
      int x;
      cin >> x;
      is[x]++;
    }
    for (int i = 0; i <= 9; i++) {
      if (is[i])
        for (int j = 0; j < is[i]; j++)
          cout << '*';
      else
        cout << '-';
      cout << endl;
    }
  }
}

C++: #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  
  int n;
  while (cin >> n, n) {
    int cnt[10] = {};
    for (int i = 0; i < n; i++) {
      int c;
      cin >> c;
      cnt[c]++;
    }
    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>
using namespace std;

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

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

int n, tmp;

int main(){
    while(scanf("%d", &n) != EOF){
        if(n == 0) break;

        int ice[10];
        std::fill(ice, ice + 10, 0);

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

            ice[tmp]++;
        }

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

    return 0;
}

C++: #include<cstdio>

using namespace std;

int main(){
	for(int n;scanf("%d",&n),n;){
		int cnt[10]={};
		while(n--){
			int a;	scanf("%d",&a);
			cnt[a]++;
		}
		for(int i=0;i<10;i++){
			for(int j=0;j<cnt[i];j++)	putchar('*');
			puts(cnt[i]?"":"-");
		}
	}
	return 0;
}