P0013. Words between dashes

Consider a sequence of words formed by letters. The words are separated with dashes, which can appear also at the beginning and in the end of the sequence. The sequence ends with a dot.

Your task is to write a program that prints the number of short words (less than five letters), medium (between five and nine letters), and long (more than nine letters).

Input

The input consists of a line with letters and dashes, finished with a dot.

Output

Your program must print a line with the number of short, medium and long words separated by commas.

Observation

Using |strings| is not allowed in this problem.

Problem information

Author: Unknown
Translator: Carlos Molina

Generation: 2026-01-25T10:13:00.086Z

© Jutge.org, 2006–2026.
https://jutge.org