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(cin >> n, n){
        int c[10] = {};
        int a;
        while(n-- > 0){
            cin >> a;
            c[a]++;
        }
        for(int x : c){
            if(x){
                while(x-- > 0)  printf("*");
                printf("\n");
            }else{
                printf("-\n");
            }
        }
    }
    return 0;
}

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

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

C++: #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
 
int main()
{
 vector<int> v(10);
 int n,i,m;
 while(cin>>n,n){
  fill(v.begin(),v.end(),0);
  for(i=0;i<n;i++){
   cin>>m;
   v[m]++;
  }
  for(i=0;i<10;i++){
   if(!v[i])cout<<"-";
   else for(n=0;n<v[i];n++)cout<<"*";
   cout<<endl;
  }
 }
 return 0;
}

C++: #include <iostream>

using namespace std;
 
#define MAX 10
 
void res(int);
 
int main()
{
    int n, num;
 
    while (cin >> n, n) {
	int ice[MAX] = {0};
	for (int i = 0; i < n; i++) {
	    cin >> num;
	    ice[num]++;
	}
	for (int i = 0; i < MAX; i++) {
            res(ice[i]);
        }
    }
    return 0;
}
 
void res(int n)
{
    if (n == 0) {
        cout << '-' << endl;
    } else {
	while (n > 0) {
	    cout << '*';
	    n--;
	}
	cout << endl;
    }
}

C++: // 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 << '-' << '\n';
			}
			else{
				for(int j=0; j<cnt[i]; j++){
					cout << '*';
				}
				cout << '\n';
			}
		}
	}

	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[n])cout<<'*';
    else cout<<'-';
    cout<<endl;
  }
}
}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <numeric>
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <fstream>
using namespace std;

int main()
{
//	cut here before submit 
//	freopen ("testcase.iceshop", "r", stdin );
	string str = "";
	int n;

	while (getline (cin, str ) ){
		stringstream ssn(str);
		ssn >> n;
		if (n == 0){
			break;
		} // end if
		vector <int> total (10, 0);

		int i,j;
		for (i = 0; i < n; ++i){
			int ice = 0;
			getline (cin, str );
			stringstream ss(str);
			ss >> ice;
			++total[ice];
		} // end for

//		for (i = 0; i < 10; ++i){
//			cout << total[i] << endl;
//		} // end for

		for (i = 0; i < 10; ++i){
			if (total[i] == 0 ){		
				cout << '-' << endl;
			}else{
				for (j = 0; j < total[i]; ++j){
					cout << '*';
				} // end for
				cout << endl;
			} // end if
		} // end for
	} // end loop
		
	return 0;
}

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

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

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

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

int n;

void solve() {
  int nums[10];
  rep(i,10) nums[i] = 0;
  
  rep(i,n) {
    int ii; cin>>ii;
    nums[ii]++;
  }
  
  rep(i,10) {
    if (nums[i]) rep(j,nums[i]) cout<<"*";
    else cout<<"-";
    cout<<endl;
  }
}

int main (int argc, char const* argv[]) {
  while (cin>>n, n) {
    solve();
  }
  return 0;
}

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

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

C++: #include <iostream>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)

int main(){
	int n;
	while(cin >> n , n){
		int hist[10] = {0} , a;
		rep(i,n)cin >> a , hist[a]++;
		rep(i,10){
			if(!hist[i])cout << "-";
			while(hist[i]--)cout << "*";
			cout << endl;
		}
	}
}

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

int main(){
  int n,index,ice[10];
  while(1){
    scanf("%d",&n);
    if(n==0) break;

    fill(ice,ice+10,0);
    for(int i=0;i<n;i++){
      scanf("%d",&index);
      ice[index]++;
    }
    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<stdio.h>
int main(){
	int i,j,m,n,k;
	while(1){
		int a[100]={0};
		if(n==0)
		return 0;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&m);
		a[m]++;
	}
	for(i=0;i<10;i++){
		if(
		a[i]==0)
		printf("-");
		else{
		for(j=0;j<a[i];j++)
		printf("*");
		}
		printf("\n");
	}
	}
}

C++: #include<iostream>

using namespace std;

int main()
{
	int n;
	int i;
	
	for(;;)
	{
		cin >> n ;
		if(n==0)
			break;
		
		int ans[16]={0};
		
		for(i=0;i<n;i++)
		{
			int a;
			cin >> a ;
			ans[a]++;
		}
		
		for(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>
using namespace std;
int main() {
    while (1) {
        int n;
        cin>>n;
        if (n==0)break;
        int T[10]={0};
        for (int i=0; i<n; i++) {
            int x;
            cin>>x;
            T[x]++;
        }
        for (int i=0; i<10; i++) {
            for (int j=0; j<T[i]; j++) {
                cout<<"*";
            }
            if (T[i]==0) {
                cout<<"-";
            }
            cout<<endl;
        }

    }
}

C++: #define scanf_s scanf
#include <stdio.h>
#include <string>
#include <math.h>
#include <stack>
#include <queue>
#include <list>
#include <vector>
#include <iostream>
using namespace std;

#define MAX 10001

int main()
{
	while (1) {
		int n, x, cou[10] = { 0 };
		char m[10][MAX];
		scanf_s("%d", &n);
		if (n == 0) break;
		for (int i = 0; i < 10; ++i) { m[i][0] = '-'; }
		for (int i = 0; i < n; ++i) {
			scanf_s("%d", &x);
			m[x][cou[x]] = '*';
			++cou[x];
		}
		for (int i = 0; i < 10; ++i) { 
			if (cou[i] == 0)++cou[i];
			m[i][cou[i]] = '\0';
		}
		for (int i = 0; i < 10; ++i) {
			printf("%s\n", m[i]);
		}
	}

}