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

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

using namespace std;

#define MAX 10

int n, k, ice[MAX];

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

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

		while(n-- > 0) {
			scanf("%d", &k);
			ice[k]++;
		}

		for(int i = 0; i < MAX; i++) {
			if(ice[i] > 0)
				while(ice[i]-- > 0)
					printf("*");
			else
				printf("-");
			puts("");
		}
	}
}

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

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

C++: #include<iostream>

using namespace std;
  
int main(void){

	int sold[10];
	int n,ice;

	while(1){
		cin>>n;
		if(n==0) break;
		for(int i=0;i<=9;i++) sold[i]=0;
		for(int i=0;i<n;i++){
			cin>>ice;
			sold[ice]++;
		}
		for(int i=0;i<=9;i++){
			if(sold[i]==0) cout<<"-"<<endl;
			else{
				while(sold[i]--){
					cout<<"*";
				}
				cout<<endl;
			}
		}
	}

	return 0;
}

C++: #include <iostream>
#include <cstring>
#include <cstdlib>
#include <algorithm>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,b) FOR(i,0,b)
#define PB push_back
#define MP make_pair
int main(){
  int n;
  while(cin>>n,n){
    int data[10];
    memset(data,0,sizeof(data));
    for(int i=0;i<n;i++){
      int a;
      cin>>a;
      data[a]++;
    }
    for(int i=0;i<10;i++){
      if(data[i]==0)cout<<'-'<<endl;
      else{
        for(int j=0;j<data[i];j++){
          cout<<'*';
        }
        cout<<endl;
      }
    }
  }
}

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

int main(){
    int n, i, c;
    string ans[10];
    cin >> n;
    
    for(i = 0; i < n; ++i){
        cin >> c;
        ans[c] += "*"; 
    }

    for(i = 0; i < 10; ++i){
        if(ans[i] == ""){
            ans[i] = "-";
        }
    }

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

C++: #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class T>
using Table = vector<vector<T>>;
const ld eps=1e-9;

//// < "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\a.txt"
int main() {
	while (1) {
		int N; cin >> N;
		vector<int>nums(10000);
		for (int i = 0; i < N; ++i) {
			int a; cin >> a; nums[a]++;
		}
		for (int i = 0; i < 10; ++i) {
			if (nums[i]) {
				for (int j = 0; j < nums[i]; ++j) {
					cout << '*';
				}
			}
			else {
				cout << '-';
			}
			cout << endl;
		}
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main (){

  int n,a,b[10];

  while(1){

    cin >>n;

    if(n == 0)break;

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

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

int main()
{
  int n, d;
  int ice[10];

  while(1)
  {
    cin >> n;
    if(!n)
      break;

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

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

    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;

int main(void)
{
	int n;

	while(cin >> n, n){
		int ice[10] = {};
		int no;

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

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

	}
	return 0;
}

C++: #include<iostream>

using namespace std;

int main() {
  int x,m,n;
  int a[10000];
  cin >> n;

  for(int i =0;i<n;i++){
    cin >> m;
    a[m] += 1;
  }
  for(int j =0;j<10;j++){
    if(a[j]==0){
      cout << "-";
    }else{
      for(int k =0;k<a[j];k++){
	cout << "*";
      }
    }
    cout << endl;
  }


	  cout << n << endl;
	return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int n,x,cnt[10],i;
	while(1){
		for(i=0;i<10;i++){
			cnt[i]=0;
		}
		scanf("%d",&n);
		if(n<1)break;
		for(i=0;i<n;i++){
			scanf("%d",&x);
			cnt[x]++;
		}
		if(cnt[0]>0){
			for(i=0;i<cnt[0];i++){
				printf("*");
				if(i==cnt[0]-1){
					printf("\n");
				}
			}
		}
		else{
			printf("-\n");
		}
		if(cnt[1]>0){
			for(i=0;i<cnt[1];i++){
				printf("*");
				if(i==cnt[1]-1){
					printf("\n");
				}
			}
		}
		else{
			printf("-\n");
		}
		if(cnt[2]>0){
			for(i=0;i<cnt[2];i++){
				printf("*");
				if(i==cnt[2]-1){
					printf("\n");
				}
			}
		}
		else{
			printf("-\n");
		}
		if(cnt[3]>0){
			for(i=0;i<cnt[3];i++){
					printf("*");
				if(i==cnt[3]-1){
					printf("\n");
				}
			}
		}
		else{
			printf("-\n");
		}
		if(cnt[4]>0){
			for(i=0;i<cnt[4];i++){
				printf("*");
				if(i==cnt[4]-1){
					printf("\n");
				}
			}
		}
		else{
			printf("-\n");
		}
		if(cnt[5]>0){
			for(i=0;i<cnt[5];i++){
				printf("*");
				if(i==cnt[5]-1){
					printf("\n");
				}
			}
		}
		else{
			printf("-\n");
		}
		if(cnt[6]>0){
			for(i=0;i<cnt[6];i++){
				printf("*");
				if(i==cnt[6]-1){
					printf("\n");
				}
			}
		}
		else{
			printf("-\n");
		}
		if(cnt[7]>0){
			for(i=0;i<cnt[7];i++){
				printf("*");
				if(i==cnt[7]-1){
					printf("\n");
				}
			}
		}
		else{
			printf("-\n");
		}
		if(cnt[8]>0){
			for(i=0;i<cnt[8];i++){
				printf("*");
				if(i==cnt[8]-1){
					printf("\n");
				}
			}
		}
		else{
			printf("-\n");
		}
		if(cnt[9]>0){
			for(i=0;i<cnt[9];i++){
				printf("*");
				if(i==cnt[9]-1){
					printf("\n");
				}
			}
		}
		else{
			printf("-\n");
		}
	}
	return 0;
}

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

int main() {
	int n,c;
	cin >> n;
	int hai[10] = {};
	for(int i = 0;i<n;i++){
		cin >> c;
		for(int j = 0;j<10;j++){
			if(c == j)
				hai[j]++;
		}

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


	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <map>
#define rep(i,n) for(int i=0;i<(int)n;i++)

using namespace std;


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