Module: (C++) STRINGS AND CHARACTERS: WORKSHOP - 2


Problem

5 /5


Christmas tree decoration

Problem

On the eve of the New Year, Vasya bought a Christmas tree and decided to decorate it. To do this, he must get the most beautiful jewelry from the top shelf of the cabinet. Unfortunately, putting a chair on a chair was a bad idea… Now instead of a box of jewelry – a pile of jewelry, shards, and items from other boxes. Of course it needs to be taken apart. But Vasya wants to watch New Year's movies so much! Help him write a program that will sort through a bunch of garbage for him. 
 
Input
The input is two lines. First – jewelry examples. Second – actually a bunch. 
 
Output
You need to display the number of decorations of each type, as well as the number of broken (indicated by a dot) decorations. 
 
Examples
# Input Output
1
60oQ 
484QQQQ.Qhu.6.oodnh...ddh76762..300ojha.
6: 3 
0: 2 
o: 3 
Q: 5 
Broken: 9
2
80 
..7.8.7.8.9.8 
8: 3 
0: 0 
Broken: 7