>>310
#include <stdio.h>
#include <ctype.h>
int main(void)
{
    int c, n = 0, in_word = 0, count[21] = { 0 };
#define MIN(a,b) ((a) > (b) ? (b) : (a))
#define COUNTUP do { if (in_word) ++count[MIN(n,20)]; } while (0)
#define OUTOFWORD do { in_word = n = 0; } while (0)
    while ((c = getchar()) != EOF) {
        if (isspace(c)) {
            COUNTUP; OUTOFWORD;
        } else if (c == '.' || c == ',') {
            COUNTUP; OUTOFWORD; ++count[0];
        } else {
            in_word = 1; ++n;
        }
    }
    COUNTUP;
    for (n = 0; n <= 20; ++n)
        printf("%2d: %d\n", n, count[n]);
    return 0;
}