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++: /* 
 * File:   main.cpp
 * Author: freebsd
 *
 * Created on 2014/08/28, 10:07
 */

#include <cstdio>

using namespace std;

int main() {
    while (true) {
        int n = 0;
        int ice[10] = {0}, icetemp = 0;
        
        scanf("%d", &n);
        
        if(n == 0) break;
        
        for (int i = 0; i < n; i++) {
            icetemp = 0;
            scanf("%d", &icetemp);
            ice[icetemp]++;
        }
        
        for (int i = 0; i < 10; i++) {
            if(ice[i] > 0) {
                for(int j = 0; j < ice[i]; j++){
                    printf("*");
                }
            }else {
                printf("-");
            }
            printf("\n");
        }
        
    }
       
    return 0;
}

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

int main()
{
    int n, a[10], b;

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

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

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

        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;
            }
        }
    }
    return 0;
}

C++: #include <iostream>
#include <vector>
#include <list>
#include <algorithm>
#include <set>
#include <queue>
#include <stack>
#include <string>
#include <sstream>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>

#define rep(i, n) for(int i = 0; i < n; i ++)
#define ITER(c) __typeof((c).begin())
#define each(c, it) for(ITER(c) it =(c).begin(); it!=(c).end(); it++)
#define ALL(c) c.begin(), c.end()
#define mp make_pair
#define pb push_back
#define MEMSET(v, h) memset((v), h, sizeof(v))
 
using namespace std; 

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

const int INF = 1 << 24;
const int N = 10;

int main(void){
    for(int n; cin >> n, n;){
        vi cnt(N);

        while(n --){
            int ind; cin >> ind;
            cnt[ind] ++;
        }

        rep(i, N){
            if(cnt[i]) while(cnt[i] --) cout << '*';
            else cout << '-';
            cout << endl;
        }
    }
 
    return 0;
}

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

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

C++: /* 1 行目に一日に販売されるアイスクリームの総数 n (1 ≤ n ≤ 10000) が与えられます。
 * 続く n 行に第 i のアイスクリームの種類 ci (0 ≤ ci≤ 9) が与えられます。
 * データセットの数は 20 を超えません。*/
#include<iostream>
using namespace std;
int main(){
	while(true){
		int n;
		cin>>n;
		if(n==0)break;
		int sum[10]={};
		for(int i=0;i<n;i++){
			int b;
			cin>>b;
			sum[b]+=1;
		}
		int j;
		for(int i=0;i<10;i++){
           if(sum[j]==0){
			   cout<<"-"<<endl;
			  } 
			for(j=0;j<sum[i];j++){
				cout<<"*"<<endl;
			}
		}
	}
}

C++: #include<cstdio>
#include<cstring>
#include<algorithm>
#include<functional>
#include<vector>
#include<stack>
#include<queue>
#include<iostream>
using namespace std;
int main(void)
{
	int n,i,j;
	int ice[9],p;
	while(1) {
		cin >> n;
		if(n==0)break;
		for(i=0;i<=9;i++) ice[i]=0;
		for(i=0;i<n;i++) {
			cin >>p;
			ice[p]++;
		}
		for(i=0;i<=9;i++) {
			if(ice[i]>0) {
				for(j=0;j<ice[i];j++) {
					cout << "*";
				}
				cout << endl;
			}
			else cout << "-" << endl;
		}
	}
	exit(0);
}

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

C++: #include<iostream>
#include<vector>
#include<string>
#include<algorithm>	
#include<cmath>
using namespace std;
int main() {
	int n, a;
	for (int h = 0; h < 20; h++) {
		cin >> n;
		int test[11] = { 0 };
		if (n == 0) {
			cin >> n; return 0;
		}
		for (int i = 0; i < n; i++) {
			cin >> a;
			test[a]++;
		}
		for (int i = 0; i < 10; i++) {
			if (test[i] == 0) {
				cout << '-' << endl;
			}
			else {
				for (int j = 0; j < test[i]; j++) {
					cout << '*';
				}
				cout << endl;
			}
		}
	}
	cin >> n;
}

C++: #include <cstdio>

int main(){
	int n;
	while(scanf("%d", &n), n){
		int p[10] = {0}, t;
		for(;n;n--)
			scanf("%d", &t), p[t]++;

		for(t=0;t<10;t++){
			if(p[t])
				for(n=p[t];n;n--)
					printf("*");
			else printf("-");
			puts("");
		}
	}
}

C++: // clang-format off
#include <bits/stdc++.h>
#define int long long
#define main signed main()
// #define main int main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecision(n)
#define stlice(from, to) substr(from, (to) - (from) + 1)
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
using namespace std;
using pii = pair<int, int>;
using vi = vector<int>;
using vd = vector<double>;
using vc = vector<char>;
using vb = vector<bool>;
using vs = vector<string>;
using vpii = vector<pii>;
using vvi = vector<vi>;
using vvb = vector<vb>;
using vvpii = vector<vpii>;
template<typename A> using fn = function<A>;
constexpr int INF = sizeof(int) == sizeof(long long) ? 1000000000000000000LL : 1000000000;
constexpr int MOD = 1000000007;
constexpr double PI = acos(-1);
template<typename A, typename B> bool cmin(A &a, const B &b) { return a > b ? (a = b, true) : false; }
template<typename A, typename B> bool cmax(A &a, const B &b) { return a < b ? (a = b, true) : false; }
constexpr bool odd(const int &n) { return n & 1; }
constexpr bool even(const int &n) { return !odd(n); }
void solve();
main { solve(); return 0; }
// clang-format on

void solve() {
  int n;
  while (cin >> n, n) {
    vi v(10);
    while (n--) {
      int c;
      cin >> c;
      v[c]++;
    }
    for (int x : v) cout << (x ? string(x, '*') : "-") << endl;
  }
}

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

using namespace std;

int main(void){
	int a,n;
	while(1){
		map<int,string> str;
		cin >> n;
		if(n==0)break;
		for(a=0;a<n;a++){
			int b;
			cin >> b;
			str[b].push_back('*');
		}
		for(a=0;a<=9;a++){
			if(str.size()>0)cout << str[a] << endl;
			else cout << "-" << endl;
		}
	}
	return 0;
}

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

using namespace std;

int main(void){

int n,x,a[10];

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

for(int i=0;i<10;i++){
if(a[i]==0)cout << "-" << endl;
else cout << a[i] << endl;
}
}

return 0;
}

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

int main()
{
  int n;

  while (cin >> n && n != 0){
    int a[10];
    for (int i = 0; i < 10; i++) a[i] = 0;
    for (int i = 0; i < n; i++){
      int s;
      cin >> s;
      a[s]++;
    }
    for (int i = 0; i < 10; i++){
      if (a[i] == 0){
        cout << '-';
      }
      while (a[i]--){
        cout << '*';
      }
      cout << endl;
    }
  }
}