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++: #define _USE_MATH_DEFINES
#define INF 10000000
#include <iostream>
#include <sstream>
#include <cmath>
#include <algorithm>
#include <queue>
#include <stack>
#include <limits>
#include <map>
#include <string>
#include <cstring>
#include <set>
#include <deque>
#include <bitset>
#include <list>

using namespace std;

typedef long long ll;
typedef pair <int,int> P;
typedef pair <int,P > PP;

static const double eps = 1e-8;

int getAvr(int* p,int n){
	int sum = 0;
	for(int i=0;i<n;i++){
		sum += p[i];
	}

	return sum/3;
}

void printIce(int* freq,int kind){
	if(freq[kind] == 0){
		printf("-\n");
		return;
	}

	for(int i=0;i<freq[kind];i++){
		printf("%s",(i == freq[kind] - 1) ? "*\n" : "*");
	}
}

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

		int* freq = new int[10]();
		for(int i=0;i<n;i++){
			int kind;
			scanf("%d",&kind);
			freq[kind]++;
		}

		for(int i=0;i<10;i++){
			printIce(freq,i);
		}

		delete[] freq;
	}
}

C++: #include <iostream>
#define rep2(x,from,to) for(int x=(from);(x)<(to);(x)++)
#define rep(x,to) rep2(x,0,to)
using namespace std;
int main(){
	int n, m;
	while(cin >> n, n) {
		int cnt[10] = {};
		rep(i,n) {
			cin >> m;
			cnt[m]++;
		}
		rep(i,10) {
			if(cnt[i]==0) cout << "-";
			else {
				rep(j,cnt[i]) cout << "*";
			}
			cout << endl;
		}
	}
}

C++: #include <stdio.h>
#include <vector>
#include <algorithm>

using namespace std;


int main(){

	int n,table[10],tmp;

	while(true){
		scanf("%d",&n);
		if(n == 0)break;

		for(int i = 0; i < 10; i++)table[i] = 0;

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

		for(int i = 0; i < 10; i++){
			if(table[i] == 0){
				printf("-\n");
			}else{
				for(int k = 0; k < table[i]; k++)printf("*");
			}
			printf("\n");
		}
	}

    return 0;
}

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

int main()
{
    int n, t;
    while(cin >> n && n) {
        int hist[10];
        memset(hist, 0, sizeof(hist));
        for(int i = 0; i < n; i++) {
            cin >> t;
            hist[t]++;
        }
        for(int i = 0; i < 10; i++) {
            if(hist[i] == 0) {
                cout << "-" << endl;
            } else {
                for(int j = 0; j < hist[i]; j++) 
                    cout << "*";
                cout << endl;
            }
        }
    }
}

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

int main()
{
	while (1) {
		int a;
		cin >> a;
		if (a == 0)break;
		vector<int>s(10);
		for (int b = 0; b < a; b++)
		{
			int c;
			cin >> c;
			s[c]++;
		}
		for (int e : s) {
			if (e == 0)cout << '-' << endl;
			else {
				for (int f = 0; f < e; f++) {
					cout << '*';
				}
				cout << endl;
			}
		}
	}
}

C++: #include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
int main(){
  int ice[10];
  int n, tmp;

  while(cin >> n, n){
    memset(ice, 0, sizeof(ice));
    for(int i = 0 ; i < n ; i++){
      cin >> tmp;
      ice[tmp]++;
    }
    
    for(int i = 0 ; i < 10 ; i++){
      if(ice[i] == 0){
	cout << '-' << endl;
	continue;
      }
      
      for(int j = ice[i] ; j > 0 ; j--){
	cout << '*';
      }
      cout << endl;
    }
  }
  return 0;
}

C++: #include<iostream>
#include<string.h>
using namespace std;
int main() {
	int a, b, c[10] = { 0 }, i, j;
	while (1) {
		cin >> a;
		if (a == 0) 
			return 0;
		for (i = 0; i < a; i++) {
			cin >> b;
			c[b]++;
		}
		for (i = 0; i < 10; i++) {
			for (j = 0; j < c[i]; j++) 
				cout << "*";
			if (j == 0) {
				cout << "-";
			}
			cout << endl;
		}
		memset(c, 0, sizeof(c));
	}
}

C++: #include <iostream>
#include <algorithm>
#include <cassert>
#include <cctype>
#include <complex>
#include <cstdio>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;

int n,k,s[10];

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

C++: #include <cstdio>
#include <iostream>
#include <iomanip>
#include <string> 
#include <vector> 
using namespace std;
  
int main(){
    /*??£???????????????????????????
            int a[2];
            cin >> a[1] >> a[2];
            cout << "[+] " << a[1] + a[2] << endl;
            cout << "[-] " << a[1] - a[2] << endl;
            cout << "[*] " << a[1] * a[2] << endl;
            cout << "[/] " << a[1] / a[2] << endl;
    */

    int a;
    while(cin >> a){
        if(a == 0){break;}
        int ans[10] = {0,0,0,0,0,0,0,0,0,0};
        string ans2[10] = {"","","","","","","","","",""};
        int p;
        for(int i = 1;a >= i;i++){
            cin >> p;ans[p]++;
        }
        for(int i = 0;9 >= i;i++){
            if(ans[i] == 0){
                ans2[i] = "-";
            }else{
                for(int ii = 1;ans[i] >= ii;ii++){
                    ans2[i] += "*";
                }
            }
            cout << ans2[i] << endl;
        }

    }
}

C++: #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < n; i++)
#define REP(i,s,n) for(int i = s; i < n; i++)
#define all(x) (x).begin(),(x).end()
typedef long long ll;
using Graph = vector<vector<pair<int,int>>>;
ll gcd(ll a, ll b) { return b ? gcd(b, a%b) : a; }
int main(){
  while(true){
    int n;
    cin >> n;
    if(n == 0)return 0;
    vector<int>cnt(10);
    rep(i,n){
      int tmp;
      cin >> tmp;
      cnt[tmp]++;
    }
    rep(i,10){
      if(cnt[i] == 0)cout << "-" << endl;
      else{
        rep(j,cnt[i])cout << "*";
        cout << endl;
      }
    }
  }
  return 0;
}

C++: #import<iostream>
#define r(i,n) for(int i=0;i<n;i++)
int main(){
    int n;while(std::cin>>n,n){int a[10]={0};r(i,n){int t;std::cin>>t;a[t]++;}r(i,10){if(!a[i])std::cout<<"-"<<"\n";else {{r(j,a[i])std::cout<<"*";}std::cout<<"\n";}}}}

C++: #include <cstdio>

using namespace std;

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

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

int main(){
	vector<int> a(9);
	int n,sort;
	while(cin>>n){
		if(n==0) break;
		else{
		fill(a.begin(),a.end(),0);
		for(int i=0;i<n;i++){
			cin>>sort;
			a[sort]++;
		}
		for(int i=0;i<10;i++){
		if(a[i]==0){
		cout<<"-";
		}else{
		for(int j=0;j<a[i];j++){
			cout<<"*";
			}
	
	}
		cout<<endl;
}
}
}
}

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

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