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<algorithm>
#include<vector>
#include<stack>
#include<map>
#include<set>
#include<queue>
#include<cstdio>
#include<climits>
#include<cmath>
#include<cstring>
#include<string>
#include<sstream>
#include<numeric>
#include<cassert>

#define f first
#define s second
#define mp make_pair

#define REP(i,n) for(int i=0; i<(int)(n); i++)
#define rep(i,s,n) for(int i=(s); i<(int)(n); i++)
#define FOR(i,c) for(__typeof((c).begin()) i=(c).begin(); i!=(c).end(); i++)
#define ALL(c) (c).begin(), (c).end()
#define IN(x,s,g) ((x) >= (s) && (x) < (g))
#define ISIN(x,y,w,h) (IN((x),0,(w)) && IN((y),0,(h)))
#define print(x) printf("%d\n",x)

using namespace std;

typedef unsigned int uint;
typedef long long ll;

const int _dx[] = {0,1,0,-1};
const int _dy[] = {-1,0,1,0};

int getInt(){
  int ret = 0,c;
  c = getchar();
  while(!isdigit(c)) c = getchar();
  while(isdigit(c)){
    ret *= 10;
    ret += c - '0';
    c = getchar();
  }
  return ret;
}

int main(){
  int n;

  while(n = getInt()){
    int cnt[10] = {0};
    REP(i,n){
      int t = getInt();
      cnt[t]++;
    }

    REP(i,10){
      if(cnt[i] == 0) putchar('-');
      else REP(j,cnt[i]) putchar('*');
      puts("");
    }
  }
  return 0;
}

C++: //2013/07/15(月) パソコン甲子園２０１０ー４　人気のアイスクリーム店

#include <iostream>
using namespace std;

int main()
{

	int n;
	int x;
	
	while(true){
		int k[10] = {0};

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

		for(int i=0; i<n; i++){
			cin >> x;
			k[x]++;
		}
		for(int i=0; i<10; i++){
			if(k[i] == 0)
				cout << '-' << endl;
			else{
				for(int j=0; j<k[i]; j++)
					cout << '*' ;
				cout << endl;
			}
		}
	}
	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");
	}
	}
	return 0;
}

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

// http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0219

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

C++: #include<iostream>
#include<algorithm>
using namespace std;
#define REP(i,b,n) for(int i=b;i<n;i++)
#define rep(i,n)   REP(i,0,n)
class state{
public:
  int p,d;
  bool operator<(const state & a)const{
    if (d != a.d)return d > a.d;
    return p < a.p;
  }
};

main(){
  int n;
  while(cin>>n&&n ){
    int a[10]={0};
    rep(i,n){
      int t;cin>>t;a[t]++;
    }
    rep(i,10){
      if (a[i]==0)cout <<'-';
      else rep(j,a[i])cout << '*';
      cout << endl;
    }


  }
}

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

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

C++: #include<bits/stdc++.h>
using namespace std;
int main()
{
	while(true){
		int N;
		scanf("%d",&N);
		if(N==0)break;
		int Q[10];
		for(int i=0;i<10;i++){
			Q[i]=0;
		}
		for(int i=0;i<N;i++){
			int num;
			scanf("%d",&num);
			Q[num]++;
		}
		for(int i=0;i<10;i++){
			if(Q[i]==0){
				printf("-\n");
			}
			else{
				for(int j=0;j<Q[i];j++){
					printf("*");
				}
				printf("\n");
			}
		}
	}
	return 0;
}

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

int main(){
        int n;
        int x;
        int icecream[10];

    while(cin >> n, n != 0){
            for(int i=0; i<10; i++) icecream[i] = 0;


            for(int i=1; i<=n; i++){
                    cin >> x;
                    icecream[x]++;
            }

            for(int i=0; i<10; i++){
                    if(icecream[i] == 0){
                            cout << "-" << endl;
                            continue;
                    }
                    for(int j=1; j<=icecream[i]; j++){
                            cout << "*";
                    }
                    cout << endl;
            }
    }
    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,10) {
			if (cnt[i] == 0) cout << "-";
			for_(j,0,cnt[i]) cout << "*";
			cout << endl;
		}
	}
}

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

int main(void) {
	while(true) {
		int n;
		scanf("%d", &n);
		if(n == 0)
			break;
		int sold[10];
		memset(sold, 0, sizeof(sold));

		for(int i = 0; i < n; i++) {
			int t;
			scanf("%d", &t);
			sold[t]++;
		}
		for(int i = 0; i <= 9; i++) {
			if(sold[i] == 0)
				printf("-\n");
			else {
				for(int j = 0; j < sold[i]; j++)
					printf("*");
				printf("\n");
			}
		}
	}
	return 0;
}

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

int n, c[10];

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

	return 0;
}

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

int main(void)
{
  int n;
  int ice_creams[10];
  int ice_index;
  while (true)
  {
    cin >> n;
    if (n == 0) break;
    fill_n(ice_creams, 10, 0);
    for (int i = 0; i < n; ++i)
    {
      cin >> ice_index;
      ++ice_creams[ice_index];
    }

    for (int i = 0; i < 10; ++i)
    {
      if (ice_creams[i] == 0)
      {
        cout << '-' << endl;
      }
      else
      {
        for (int j = 0; j < ice_creams[i]; ++j)
        {
          cout << '*';
        }
        cout << endl;
      }
    }
  }
  return 0;
}

C++: #include<iostream>
using namespace std;
int main()
{
	int n;
	cin>>n;
	int ice[10000] = {};
	int i;
	for(i = 0;i < n;i++){
		cin>>ice[i];
	}
	for(int j = 0;j < i;j++){
		if(ice[j] == 0){
			cout<<"-"<<endl;
		}else{
			for(int k = 0;k < j;k++){
				cout<<"*";
			}
		}
	}
	
	return 0;
}

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

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

	int ice[10],num;

	for(int i=0; i<n; i++)
		ice[0] = 0;

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

	for(int i=0; i<10; i++){
		while(true){
			if(ice[i]==0){
				cout << "-" << endl;
				break;
			}else{
				for(int k=i; ice[k]!=0; ice[k]--)
					cout << "*";
				cout << endl;
				break;
			}
		}
	}

}
return 0;
}