Олимпиадный тренинг

Задача 18711. The number of ones, twos, triplets, etc. #2


Задача

Темы:
(Same task as "Number of 1s, 2s, 3s, etc. #1", only up to 100,000 numbers can be entered)
 
Enter numbers from 1 to 9 until
until 0 is entered. A maximum of 100,000 numbers will be entered in total
 
Count the number of units in this sequence,
the number of twos, the number of triples, and so on (in the output
file should always have 9 numbers).
 
 
Sample input file
1 1 4 1 5 8 6 3 5 1 0
 
Sample output file:
4 0 1 1 2 1 0 1 0