P6438 [COCI 2011/2012 #6] PROZORI
Background
Spring has arrived, and people are gradually starting to pull down their blinds.
Description
We represent a window blind as a $4 \times 4$ square grid. In each row, all characters are either `*` or all are `.`. The blind can only be in the following five states:

The building opposite has $n$ floors, and each floor has $m$ windows. Given the representation of the windows in the building, find how many blinds there are in each of the five states above.
Input Format
The first line contains two integers, representing the number of floors $n$ and the number of windows per floor $m$.
The next $(5n + 1)$ lines each contain $(5m + 1)$ characters describing the building’s windows. The window frames are represented by `#`, and the inside can only be one of the five states given above. You can read the sample to better understand the input format.
Output Format
Output one line with five integers separated by spaces, in order, representing how many blinds are in each of the five states above.
Explanation/Hint
#### Explanation of Sample 1
- The window whose top-left corner is at row $2$, column $2$, and bottom-right corner is at row $5$, column $5$ is a window in the first state.
- The window whose top-left corner is at row $2$, column $7$, and bottom-right corner is at row $5$, column $10$ is another window, in the third state.
#### Constraints
For all testdata, it is guaranteed that $1 \leq n, m \leq 100$.
#### Notes
**This problem is translated from [COCI2011-2012](https://hsin.hr/coci/archive/2011_2012/) [CONTEST #6](https://hsin.hr/coci/archive/2011_2012/contest6_tasks.pdf) *T2 PROZORI***. Translation by @[一扶苏一](https://www.luogu.com.cn/user/65363).
Translated by ChatGPT 5