#include <stdio.h>

int main()
{
	int hist[5] = {0};
	int n, i, j;

	while (1) {
		printf("値:");
		scanf("%d", &n);
		if (n < 1 || 5 < n) break;
		hist[n-1]++;
	}
	for (i = 0; i < 5; i++) {
		printf("%d=%d:", i+1, hist[i]);
		for (j = 0; j < hist[i]; j++) {
			printf("%c", ((j+1) % 3) ? '*' : 'x');
		}
		printf("\n");
	}
	return 0;
}
