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<bits/stdc++.h>
using namespace std;
main(){
  int a[10005],n,aice;
  while(1){
    cin>>n;
    if(n==0)break;
    memset(a,0,sizeof(a));
    for(int i=0;i<n;i++){
      cin>>aice;
      a[aice]++;
    }
    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;
      }
    }
  }
}

C++: #include <bits/stdc++.h>

using namespace std;

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(v) (v).begin(),(v).end()
#define fi first
#define se second

template<typename A, typename B> inline bool chmax(A &a, B b) { if (a<b) { a=b; return 1; } return 0; }
template<typename A, typename B> inline bool chmin(A &a, B b) { if (a>b) { a=b; return 1; } return 0; }

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<int, pii> pip;

const ll INF = 1ll<<29;
const ll MOD = 1000000007;
const double EPS  = 1e-10;

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

C++: #include<iostream>

using namespace std;

int main()
{
	while(true)
	{
		int n = 0;
		int ice[10001];

		for(int i = 0; i < 10001; i++)
		{
			ice[i] = 0;
		}

		cin >> n;

		if(n == 0)
		{
			return false;
		}

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

			ice[tmp]++;
		}

		for(int i = 0; i < n; i++)
		{
			if(ice[i] == 0)
			{
				cout << '-';
			}

			else
			{
				while(ice[i] != 0)
				{
					cout << '*';
					ice[i]--;
				}
			}

			cout << endl;
		}
	}
}

C++: #include<iostream>
using namespace std;
int main(){
	int kai, aicec;
	int aice[11] = { 100, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; //??????
	int count[11] = { 0 };
	cin >> kai;
	while (kai != 0){//???????????¶
		for (int i = 0; i < kai; i++){
			cin >> aicec;
			for (int l = 1; l <= 10; l++){//??????
				if (aice[l] == aicec) count[l]++;//????????????
			}
		}
		for (int i = 1; i <= 10; i++){
			if (count[i] == 0)cout << "-" << endl;
			else {
				for (int l = 0; l < count[i]; l++){
					cout << "*";
				}cout << endl;
			}
		}
		for (int i = 1; i <= 10; i++) count[i] = 0;
		cin >> kai;
	}
	return 0;
}

C++: #include <iostream>
#include <string>
int ice[10];
int main(){
	int n;
	while(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>
#include<vector>
#include<algorithm>
using namespace std;
int main(){

  int n;
  while(cin >> n){
    vector<int>co;
    int i;
    int no;
    if(n==0)
      break;
    for(i=0;i<10;i++)
      co.push_back(0);
    for(i=0;i<n;i++){
      cin >> no;
      co[no]++;
    }
    for(i=0;i<10;i++){
      int j;
      for(j=0;j<co[i];j++)
	cout << '*';
      if(co[i]==0)
	cout << '-';
      cout << endl;
    }
  }
}

C++: #define _USE_MATH_DEFINES
#include <iostream>
#include <string>
#include <utility>
#include <algorithm>
#include <queue>
#include <map>
#include <fstream>
#include <array>
#include <utility>
#include <functional>
#include <stack>
#include <math.h>
#include <numeric>
#include <set>

using namespace std;
typedef long long Int;
#define REP(i , x) for(Int i = 0 ; i < x ; ++i)
typedef pair<int, int> P;



int main()
{
	int n;
	while (cin >> n,n){
		int data[10];
		fill(data, data + 10, 0);

		REP(i, n){
			int a;
			cin >> a;
			++data[a];
		}
		REP(i, 10){
			if (data[i]){
				REP(j, data[i]){
					cout << "*";
				}
				cout << endl;
			}
			else{
				cout << "-" << endl;
			}
		}
	}
	return 0;
}

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

int main(){

    int n;
    while(cin>>n,n){
        int cnt[10]={0};
        while(n--){
            int a;
            cin>>a;
            cnt[a]++;
        }

        for(int i=0;i<10;i++){
            if(!cnt[i])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(){
  
  int n;
  
  while(1){
    
    cin>>n;

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

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

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

int main(){
	int sales_sum[10];
	int n;
	int sales;
	
	for(;;){
		for(int i = 0; i < 10; i++){
			sales_sum[i] = 0;
		}
		cin >> n;
		if(n == 0) break;
		for(int i = 0; i < n; i++){
			cin >> sales;
			sales_sum[sales]++;
		}
		for(int i = 0; i < 10; i++){
			if(sales_sum[i] == 0){
				cout << '-' << endl;
				continue;
			}
			for(int j = 0; j < sales_sum[i]; j++){
				cout << '*';
			}
			cout << endl;
		}
	}
	
	return 0;
}

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

C++: #include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

int main()
{
    for(;;){
        int n;
        cin >> n;
        if(n == 0)
            return 0;

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

        for(int i=0; i<10; ++i){
            if(num[i] == 0)
                cout << '-' << endl;
            else
                cout << string(num[i], '*') << endl;
        }
    }
}

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

int main(){
	int n, p;
	int type[10];

	while(cin >> n, n){
		fill(type, type+10, 0);
		for(int i=0; i < n; i++){
			cin >> p;
			type[p]++;
		}
		for(int i=0; i < 10; i++){
			if(type[i] != 0){
				for(int j=0; j < type[i]; j++) cout << '*';
				cout << endl;
			}
			else cout << '-' << endl;
		}
	}
}

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

using namespace std;

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