## BlueBook - Voting

View as PDF

Points: 4
Time limit: 1.0s
Memory limit: 16M

Problem type
##### BlueBook

Given characters , each denoting one vote for the corresponding candidate, determine the number of votes received by each candidate, as well as the number of spoiled ballots.

Votes for valid candidates in the election are denoted by the letters A through F, inclusive. Any other character represents a spoiled ballot.

#### Input Specification

The first line contains a single integer .
The following lines each contain a single character , representing one vote.

#### Output Specification

Lines 1…6 should each contain one integer, the number of votes that candidates AF, respectively, received in the election. Line 7 should also contain one integer, the number of spoiled ballots.

#### Sample Input

5
A
B
C
B
%

#### Sample Output

1
2
1
0
0
0
1