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("*")
				}
			}
		}
	}
}

Python: for i in range(20):
    n=int(input())
    if n==0:break
    
    x=[]
    for j in range(n):
        a=int(input())
        x.append(a)
        
    for k in range(10):
        y=x.count(k)
        
        if y==0:
            print('-')
        else:
            print('*'*y)

Python: while True:
    n = int(input())
    if n == 0:
        break
    l = [0] * 10
    for i in range(n):
        a = int(input())
        l[a] += 1
    for a in l:
        if a > 0:
            print("*" * a)
        else:
            print("-")

Python: while True:

    N = int(input())
    if N == 0:
        break

    ans = [0 for i in range(10)]
    for l in range(N):
        k = int(input())
        ans[k] += 1

    for i in range(10):
        if ans[i] == 0:
            print("-")
        else:
            for j in range(ans[i]):
                print("*",end="")
            print("")

Python: while True :
    n = int(input())
    if n == 0 :
        break
    
    ice = list([0] * 10)
    for i in range(n) :
        ice[int(input())] += 1
    

    for i in range(10) :
        if ice[i] > 0 :
            for j in range(ice[i]) :
                print("*", sep="", end="")
            print()
        else :
            print("-")

Python: while True:   
    n=int(input())
    if n==0: break
    c=[0]*10
    for i in range(n):
        c[int(input())]+=1
    for j in range(10):
        if c[j]==0:
            print('-')
        else:
            print('*'*c[j])

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

int main() {
  int n, t;
  while (cin >> n, n) {
    int c[10] = {};
    while (n--) {
      cin >> t;
      c[t]++;
    }
    for (int i = 0; i < 10; i++) {
      if (c[i]) {
        string s(c[i], '*');
        cout << s << "\n";
      } else {
        cout << "-\n";
      }
    }
  }
}

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

int main(){
  int n,aizu[20],in;
 
  while(_w_){
    cin >> n;
    if(n == 0)break;
 for(int i=0;i<20;i++)aizu[i]=0;
    while(n-- > 0){
      cin >> in;
      aizu[in]++;
    }
    for(int i=0;i<=9;i++){
      if(aizu[i] == 0)cout << "-" << endl;
      else {
	for(int j=0;j<aizu[i];j++){
	  cout << "*";
	}
	cout << endl;
      }
    }


  }
  return 0;
}

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

int main(){
	int n,m;
	while(1){
		cin >> n;
		if(n == 0) break;
		int cou[11111]={0};
		for(int i=0;i<n;i++){
			cin >> m;
			cou[m]++;
		}
		for(int i=0;i<10;i++){
			if(cou[i] == 0) cout  << "-";
			for(int j=0;j<cou[i];j++){
				cout << "*";
			}
			cout << endl;
		}
	}
}

C++: #include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cassert>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <functional>
#include <iostream>
#include <map>
#include <set>
using namespace std;
typedef pair<int,int> P;
typedef pair<int,P> P1;
typedef pair<P,P> P2;
typedef long long ll;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-7
#define INF 1000000000
#define fi first
#define sc second
#define rep(i,x) for(int i=0;i<x;i++)
int main()
{
	while(1)
	{
		int n;
		cin >> n;
		if(n == 0) return 0;
		int cnt[10]={};
		for(int i=0;i<n;i++)
		{
			int a;
			cin >> a;
			cnt[a]++;
		}
		for(int i=0;i<10;i++)
		{
			if(cnt[i] == 0) puts("-");
			else
			{
				for(int j=0;j<cnt[i];j++)
				{
					printf("*");
				}
				puts("");
			}
		}
	}
}

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

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

int n;

int main() {
    while(1) {
        cin >> n;
        if (n == 0) break;
        vector<int> hist(10, 0);
        for (int i = 0; i < n; ++i) {
            int c;
            cin >> c;
            hist[c]++;
        }
        for (auto cnti : hist) {
            for (int i = 0; i < cnti; ++i) {
                cout << "*";
            }
            if (cnti == 0) cout << "-";
            cout << 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<<"*";}std::cout<<"\n";}}}}

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

int main() {
	// your code goes here
	int N;
	
	while(cin >> N && N){
		int ices[10]={};
		int tmp;
		for(int i=0;i<N;i++){
			cin >> tmp;
			ices[tmp]++;
		}
		for(int i=0;i<10;i++){
			for(int j=0;j<ices[i];j++)
				cout << '*';
			if(ices[i]==0)
				cout << '-';
				cout << endl;
		}
		
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
  int n;
  while(  cin >> n,n ){
  int b,t[10000] = {0};
    for(int i = 0 ; i < n ; i++ ){
      cin >> b;
      ++t[b];
    }
    for(int i = 0 ; i <= 9 ; i++ ){
	if(t[i] == 0)cout << '-';
      for(int j = 1 ; j <= t[i]; j++ ){
	cout << '*';
      }
      cout << endl;
    }
  }
}

C++: /*
	0219:A Popular Ice-cream Shop
*/
#include	<iostream>

using namespace std;

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

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

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

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

using namespace std;

int main(){

	int n;
	while(cin>>n&&n!=0){
		int v[10];
		fill(v,v+10,0);
		for(int i = 0; i < n; i++){
			int t;
			cin>>t;
			v[t]++;
		}
		for(int i = 0; i < 10; i++){
			int num=v[i];
			if(num>=1){
				for(int j = 0; j < num; j++)
					cout<<'*';
				cout<<endl;
			}
			else{
				cout<<'-'<<endl;
			}
		}
	}

	return 0;
}

C++: #include<iostream>

using namespace std;

int main() {
  while(cin>>n){
  int x,m,n;
  int a[10000];
  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<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<string.h>
#include<math.h>
#include<cstring>
using namespace std;


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