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<string>
#include<algorithm>
using namespace std;

int main() {
	int n,c;
	cin >> n;
	int hai[10];
	fill(hai,hai + 10,0);
	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<cstring>
using namespace std;
int n, a[10], x;
int main() {
	while (true) {
		cin >> n;
		if (n == 0) { break; }
		memset(a, 0, sizeof(a));
		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 {
				for (int j = 0; j < a[i]; j++) { cout << '*'; }
				cout << endl;
			}
		}
	}
}

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

C++: #include<cstdio>
using namespace std;
int main(){
	for(int n;scanf("%d",&n),n;){
		int cnt[10]={};
		while(n--){
			int a;	scanf("%d",&a);
			cnt[a]++;
		}
		for(int i=0;i<10;i++){
			for(int j=0;j<cnt[i];j++)	putchar('*');
			puts(cnt[i]?"":"-");
		}
	}
}

C++: #include<iostream>
#include<string>
using namespace std;
int main(){
long n,i,j;
string s[10];
while(cin>>n,n){
for(j=0;j<10;j++)s[j]="";
for(i=0;i<n;i++){
cin>>j;
s[j]+="*";
}
for(j=0;j<10;j++){
if(s[j]=="")cout<<"-"<<endl;else cout<<s[j]<<endl;
}
}
return 0;
}

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

int main() {

  while(1) {

    int ice[10] = {0};
    int n;

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


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

  }

  return 0;

}

C++: //メモリ数確認したか?
#include<iostream>
#include<cstdio>
#include<string>
#include<vector>
#include<algorithm>
#include<cstdlib>
using namespace std;
typedef long long int ll;

int main()
{
	while(true){
    string s[10];
	int n,a;
	scanf("%d",&n);
	if(n==0)return 0;
	for(int i=0;i<n;i++){
		scanf("%d",&a);
		s[a]+="*";
	}
	for(int i=0;i<10;i++){
		if(s[i].length()==0)printf("-\n");
		else cout << s[i] << "\n";
	}
	}
    return 0;
}
//メモリ数確認したか?

C++: #include <iostream>

using namespace std;

int main()
{
	for(int n;cin>>n,n;){
		int c[10]={};
		while(n--){
			int x; cin>>x;
			c[x]++;
		}
		for(int i=0;i<10;i++){
			if(c[i]==0)
				cout<<'-'<<endl;
			else
				cout<<string(c[i],'*')<<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<<"*";}puts("");}}}}

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

  int n;
  while(0!=cin >> n){
    vector<int>co;
    int i;
    int no;
    for(i=0;i<10;i++)
      co.push_back(0);
    for(i=0;i<n;i++){
      cin >> no;
      co[no]++;
    }
    for(i=0;i<10;i++){
      int j;
      for(j=0;j<co[i];j++)
	cout << '*';
      if(co[i]==0)
	cout << '-';
      cout << endl;
    }
  }
}

C++: #include<stdio.h>
int main(void)
{
	int n,x,cnt[10],i,j;
	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]++;
		}
		for(i=0;i<10;i++){
			if(cnt[i]>0){
				for(j=0;i<cnt[i];j++){
					printf("*");
					if(i==cnt[i]-1){
						printf("\n");
					}
				}
			}
			else{
				printf("-\n");
			}
		}
	}
	return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
    int n, idx;

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

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

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

C++: #include <stdio.h>

#define MYSCAN scanf

int main(void){
	int n, v;
	int ice[10] = { 0 };

	while (true){

		MYSCAN("%d", &n);
		if (n == 0){ break; }
		for (int i = 0; i < n; i++){
			MYSCAN("%d", &v);
			ice[v]++;
		}
		for (int i = 0; i < 10; i++){
			if (ice[i] == 0){
				printf("-\n");
			}
			else{
				for (int j = 0; j < ice[i]; j++){
					printf("*");
				}
				printf("\n");
				ice[i] = 0;
			}
		}

	}	
	return 0;
}

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


string bar(int len) {
    if (len <= 0) {
        return "-";
    }
    string ret = "";
    for (int i=0; i<len; ++i) {
        ret += "*";
    }
    return ret;
}

int main() {
    int n, a;
    while (cin >> n, n) {
        vector<int> num(10, 0);
        for (int i=0; i<n; ++i) {
            cin >> a;
            num[a] ++;
        }
        for (int i=0; i<10; ++i) {
            cout << bar(num[i]) << endl;
        }
    }
    return 0;
}

C++: #include<cstdio>

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

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

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

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

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

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

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