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 <cstdio>
using namespace std;
int main(void){
  int n,a;
  while(cin>>n,n!=0){
    int d[10]={0};
    for(int i=0;i<n;i++){
      cin>>a;
      d[a]++;
    }
    for(int i=0;i<10;i++){
      if(d[i]==0)printf("-");
      for(int j=0;j<d[i];j++){
	printf("*");
      }
      printf("\n");
    }
  }
  return 0;
}

C++: q

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

int main()
{
    int N;
    while (cin >> N, N) {
        auto count_list = array<int, 10>();

        while (N--) {
            int kind;
            cin >> kind;
            count_list[kind]++;
        }

        for (auto count : count_list) {
            if (count > 0) {
                while (count--) {
                    cout << '*';
                }
            } else {
                cout << '-';
            }
            cout << endl;
        }
    }
}

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

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

C++: #include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <complex>
#include <string>
#include <sstream>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <functional>
#include <iostream>
#include <map>
#include <set>
using namespace std;
typedef pair<int,int> P;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-7
#define INF 2000000000
#define EQ(a,b) (abs((a)-(b))<EPS)
int d[10];
int main()
{
	while(1)
	{
		for(int i=0;i<10;i++)
		{
			d[i]=0;
		}
		int n;
		cin >> n;
		if(n==0)break;
		for(int i=0;i<n;i++)
		{
			int x;
			cin >> x;
			d[x]++;
		}
		for(int i=0;i<10;i++)
		{
			if(d[i]==0)
			{
				cout << '-' << endl;
			}
			else
			{
				for(int j=0;j<d[i];j++)
				{
					cout << '*';
				}
				cout << endl;
			}
		}
	}
	return 0;
}

C++: #include<iostream>

using namespace std;

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

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

int main(){
	int n,x;
	int a[9];
	while(cin >> n, n){
		for(int i = 0; i <= 9; i++){
			a[i] = 0;
		}

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

/*
		for(int i = 0; i <= 9; i++){
			cout << a[i] << endl;
		}
*/

		for(int i = 0; i < 9; i++){
			for(int i = 0; i < a[x]; i++){
				if(a[x] == 0){
					cout << "-" << endl;
					break; 
				}
				cout << "*";
			}
		cout << endl;
		}
	}
}

C++: #include<iostream>
#include<iomanip>
#include<algorithm>
#include<array>
#include<bitset>
#include<cassert>
#include<cctype>
#include<cmath>
#include<cstdio>
#include<cstring>
#include<functional>
#include<limits>
#include<list>
#include<map>
#include<numeric>
#include<set>
#include<stack>
#include<string>
#include<sstream>
#include<unordered_map>
#include<queue>
#include<vector>
using namespace std;

//#define int long long
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;

#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define all(a) (a).begin(),(a).end()
#define dump(o) {cerr<<#o<<" "<<o<<endl;}
#define dumpc(o) {cerr<<#o; for(auto &e:(o))cerr<<" "<<e;cerr<<endl;}
#define INF 0x3f3f3f3f
#define INFL 0x3f3f3f3f3f3f3f3fLL
const int MOD = 1e9 + 7;

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

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

int main(){

  int n,m;

  while(cin >> n, n){
    int a[100000] = {0};
    for(int i=0;i<n;i++){
      cin >> m;
      a[m]++;
    }

    for(int i=0;i<10;i++){
      for(int j=0;j<a[i];j++) cout << "*";
      if(a[i] == 0) 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 <iostream>
#include <vector>
using namespace std;

int main(){
  vector<int> outp;
  int icn;
  int icd;
  int g;
  vector<int> ice;
  for(g = 0;;g++){
    vector<int> ice(10,0);
    cin >> icn;
    if(icn == 0){
      break;
    }else{
    for(int a = 0;a< icn;a++){
      cin >> icd;
      ice[icd] += 1;
    }
    outp.insert(outp.end(),ice.begin(),ice.end());
  }
  }
  for(int n = 0;n<g * 10;n++){
    if(outp[n] == 0){
      cout << "-";
    }else{
      for(int c = 0;c<outp[n];c++){
        cout << "*" ;
      }
    }
    cout << endl;
  }
  return 0;
}

C++: #include<bits/stdc++.h>

#define endl '\n'

using namespace std;

int main(){

  cin.tie(0);     // cout と cin の同期を切る
  ios::sync_with_stdio(false);  /* cの stdioストリーム (printfとか) */

  int n;



  int c;

  while(1){
    cin>>n;

    int cnt[10]={ };

    if(n==0){
      break;
    }

    for(int i=0;i<n;i++){
      cin>>c;

      cnt[c]+=1;
    }

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

}

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

int main()
{
	int n;
	
	while (cin >> n, n){
		int ice[10] = {0};
		int num;
		
		for (int i = 0; i < n; i++){
			cin >> num;
			ice[num]++;
		}
		
		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<stdio.h>
#include<algorithm>
#include<iostream>
using namespace std;

int main(){

  int n,i,j,a;

  while(1){

  int data[100000]={0};

  scanf("%d",&n);

  if(n==0)break;

  for(i=0;i<n;i++){
    scanf("%d",&a);
    data[a]++;
  }

  for(i=0;i<10;i++){
    if(data[i]==0){
      printf("-");
    }
    else {
      for(j=0;j<data[i];j++){
	printf("*");
      }
    }
    printf("\n");
  }

  }
  return 0;
}