#include <stdio.h>
#include <ctype.h>

void starbar(int howmany)
{
  int cnt;

  cnt = 0;
  while(cnt < howmany)
  {
    putchar('*');
    cnt++;
  }
}

void main(void)
{
  int c;
  int count[26];
  int index;
  int total;
  int max;

  index = 0;
  while (index < 26)
  {
    count[index] = 0;
    index++;
  }

  total = 0;
  c = getchar();
  while (c != EOF)
  {
    c = toupper(c);
    if (isalpha(c)) 
    {
      total++;
      count[c - 'A']++;
    }
    c = getchar();
  }

  index = 0;
  max = 0;
  while (index < 26)
  {
    if (count[index] > max)
      max = count[index];
    index++;
  }

  printf("The max is: %d\n", max);

  index = 0;
  while (index < 26)
  {
    printf("%c %3d (%6.2f%%): ", 
      index + 'A', count[index], 
      (count[index] * 100.0) / total);
    starbar((count[index] * 60) / max);
    printf("\n");
    index++;
  }
}
