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<vector>
using namespace std;

int main(int argc, char *argv[]){
  int n;
  while(std::cin >> n, n){
  vector<int> ice(10, 0);
  for (int i = 0; i < n; i++) {
    int tmp;
    std::cin >> tmp;
    ice[tmp]++;
  }
  for (int i = 0; i < 10; i++) {
    if(ice[i] == 0)std::cout << "-";
    for (int j = 0; j < ice[i]; j++) {
      std::cout << "*";
    }
    std::cout << std::endl;
  }
  }
  return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(void)
{
	int i,j,k,n,a,data[10];
	while(cin>>n&&n) {
		for(i=0;i<10;i++) data[i]=0;
		for(i=0;i<n;i++) {
			cin>>a;
			data[a]++;
		}
		for(i=0;i<10;i++) {
			if(data[i]==0) cout<<"-";
			for(j=0;j<data[i];j++) {
				cout<<"*";
			}
			cout<<endl;
		}
	}
}

C++: #define _CRT_SECURE_NO_WARNINGS

#include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <fstream>
#include <set>
#include <utility>
#include <algorithm>
#include <queue>
#include <stack>
#include <deque>
#include <numeric>
#include <sstream>
#include <list>
#include <map>

#define rep(i,p,n) for(int i=(int)p;i<(int)n;i++)
#define repp(i,p,n) for(int i=(int)p;i>=(int)n;i--)
#define Sort(x) sort(x.begin(),x.end());
#define ll long long 
#define vi vector<int>
#define vvi vector<vector<int>>
#define vvvi <vector<vector<vector<int>>> 
#define vc vector<char> 
#define vvc vector<vector<char>>
#define vvvc vector<vector<vector<char>>> 
#define INF 2000000000

using namespace std;

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

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

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

	

	


	return 0;
}

C++: #include<cstdio>
int main(){
    int n;
    for(;;){
        scanf("%d",&n);
        if(n==0) break;
        int a[10];
        for(int i=0;i<10;i++){
            a[i]=0;
        }
        for(int i=0;i<n;i++){
            int ins;
            scanf("%d",&ins);
            a[ins]++;
        }
        for(int i=0;i<10;i++){
            if(a[i]>0){
                for(int j=0;j<a[i];j++){
                    printf("*");
                }
                printf("\n");
            }else printf("-\n");
        }
    }
}

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

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;

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 <stdio.h>

void graph(int n){ /*nÔÚÌíÞÌACXª¢­Â é©ð\¦·éOt */
	int i;
	if (n != 0){  /*àµAACXª1ÂÅàê½Èç*/
		for (i = 0; i < n; i++) {
			printf("*");
		}
		printf("\n");
	}
	else{ /*»¤ÅÈ¯êÎ */
		printf("-\n");
	}
}

int main(void)
{
	int i;
	int j;
	int n; /*ACXÌ */
	int bice; /*N©ªÁ½ACX*/
	int ice[10]; /*ACXÌíÞ*/
	
	scanf("%d", &n);
	
	while(n != 0){
		/*for¶Ì(i = 0;c;i++);ÌcÌªÉÓ. 10ÈÌ©AACXÌÈÌ©ðµÁ©è©Éßæ¤!*/
		for (i = 0; i < 10; i++){ /*ice[ÈñÆ©]Ìú»*/
			ice[i] = 0;
		}
		for (i = 0; i < n; i++) { /*»ê¼êÌÁ½ACXÌíÞÌm©ß*/
			scanf("%d", &bice);
			ice[bice]++;
		}
		for(i = 0; i < 10; i++){
			graph(ice[i]);
		}
		
		scanf("%d", &n);
	}
	
	return (0);
}

C++: #include<stdio.h>

int main(void){
	int n;
	while(scanf("%d", &n),n){
		int a[10] ={0};
		int t;
		
		for(int i = 0; i < n; i++){
			scanf("%d", &t);
			a[t]++;
		}
		
		for(int i = 0; i < 10; i++){
			if(a[i]==0){
				puts("-");
			}else{
				for(int j = 0; j < a[i]; j++){
					printf("*");
				}puts("");
			}
		}
	}
	return 0;
}

C++: #include <iostream>

int main(){
	int n;
	while(std::cin >> n, n){
		int ice[10] = {0};
		for(int i=n;i;i--){
			int t;
			std::cin >> t;
			ice[t]++;
		}


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

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


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

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

int main()
{
    int n;
    while(1)
    {
        int sell_num[10] = {};
        cin >> n;
        if(n == 0)
        {
            break;
        }
        for(int i=0; i<n; i++)
        {
            int id;
            cin >> id;
            sell_num[id]++;
        }
        for(int i=0; i<10; i++)
        {
            if(sell_num[i] == 0)
            {
                cout << "-" << endl;
            }
            else
            {
                string str;
                for(int j=0; j<sell_num[i]; j++)
                {
                    str += "*";
                }
                cout << str << endl;
            }
        }
    }
    return 0;
}

C++: #include <iostream>

using namespace std;

int main() {

	int n, j, x[10];

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

	return 0;

}

C++: #include<iostream>

using namespace std;

int main() {
  while(1){
  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;
  }
  }
	return 0;
}

C++: #include <iostream>
#include <vector>
using namespace std;
int main(void)
{
	int n,k;
	vector<int> ice(10);
	while(1){
		cin >> n;
		if(n==0) break;
		for(int i=0;i<10;i++) ice[i]=0;
		for(int i=0;i<n;i++){
			cin >> k;
			ice[k]+=1;
		}
		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;
			}
		}
		ice.clear();
	}
	return 0;
}